From 4db02de530ceb22a814ab6f53eda77c40de03fe7 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 5 Jul 2009 15:26:58 +0300 Subject: Add the mountee to the list of merged filesystems. * 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. --- node.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'node.c') 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 . + Adapted for unionmount by Sergiu Ivanov . + 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; -- cgit v1.2.3