summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorSergiu Ivanov <unlimitedscolobb@gmail.com>2009-07-05 15:26:58 +0300
committerSergiu Ivanov <unlimitedscolobb@gmail.com>2009-12-10 21:32:45 +0000
commit4db02de530ceb22a814ab6f53eda77c40de03fe7 (patch)
tree759b4287eaa92b2d63c4895f5c7209b184bb3ce4 /node.c
parentd711d1eb2ac42911690a107f80e7fb5df09a4782 (diff)
Add the mountee to the list of merged filesystems.unionmount
* mount.c (start_mountee): Add the mountee's filesystem to the list of merged filesystems. * node.c (node_init_root): Take into consideration the fact that an empty string refers to the mountee root. * ulfs.c (ulfs_check): Likewise. (ulfs_register): Don't check whether "" is a valid directory.
Diffstat (limited to 'node.c')
-rw-r--r--node.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/node.c b/node.c
index cf9a8b4..f8ad886 100644
--- a/node.c
+++ b/node.c
@@ -1,7 +1,10 @@
/* Hurd unionfs
- Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2005, 2009 Free Software Foundation, Inc.
+
Written by Moritz Schulte <moritz@duesseldorf.ccc.de>.
+ Adapted for unionmount by Sergiu Ivanov <unlimitedscolobb@gmail.com>.
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
@@ -33,6 +36,7 @@
#include "node.h"
#include "ulfs.h"
#include "lib.h"
+#include "mount.h"
/* Declarations for functions only used in this file. */
@@ -535,8 +539,13 @@ node_init_root (node_t *node)
break;
if (ulfs->path)
- node_ulfs->port = file_name_lookup (ulfs->path,
- O_READ | O_DIRECTORY, 0);
+ {
+ if (!ulfs->path[0])
+ node_ulfs->port = mountee_root;
+ else
+ node_ulfs->port = file_name_lookup (ulfs->path,
+ O_READ | O_DIRECTORY, 0);
+ }
else
node_ulfs->port = underlying_node;