summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGianluca Guida <glguida@gmail.com>2005-05-29 16:37:07 +0000
committerGianluca Guida <glguida@gmail.com>2005-05-29 16:37:07 +0000
commit60e5cc0a61638f9ffd9be22f3fbecc66ae174e03 (patch)
tree167a30eb690aa42d83610679e679564f3f66cafa /main.c
parenta3076a2b40ebe183769eb8c163f5ecda107d955f (diff)
stow major fixes
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/main.c b/main.c
index 2b8ebd2..999ead9 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
/* Hurd unionfs
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
Written by Moritz Schulte <moritz@duesseldorf.ccc.de>.
This program is free software; you can redistribute it and/or
@@ -28,13 +28,14 @@
#include <unistd.h>
#include "version.h"
-
#include "unionfs.h"
#include "ncache.h"
#include "ulfs.h"
#include "lnode.h"
#include "node.h"
#include "options.h"
+#include "stow.h"
+#include "update.h"
char *netfs_server_name = "unionfs";
char *netfs_server_version = HURD_VERSION;
@@ -67,6 +68,12 @@ main (int argc, char **argv)
mach_port_t bootstrap_port;
error_t err = 0;
+ root_update_init ();
+
+ err = stow_init();
+ if (err)
+ error (EXIT_FAILURE, err, "failed to initialize stow support");
+
/* Argument parsing. */
argp_parse (&argp_startup, argc, argv, ARGP_IN_ORDER, 0, 0);
@@ -104,15 +111,15 @@ main (int argc, char **argv)
netfs_root_node->nn_stat.st_mode = S_IFDIR | (underlying_node_stat.st_mode
& ~S_IFMT & ~S_ITRANS);
netfs_root_node->nn_translated = netfs_root_node->nn_stat.st_mode;
-
+
/* If the underlying node isn't a directory, enhance the stat
information. */
if (! S_ISDIR (underlying_node_stat.st_mode))
{
if (underlying_node_stat.st_mode & S_IRUSR)
- netfs_root_node->nn_stat.st_mode |= S_IXUSR;
+ netfs_root_node->nn_stat.st_mode |= S_IRUSR;
if (underlying_node_stat.st_mode & S_IRGRP)
- netfs_root_node->nn_stat.st_mode |= S_IXGRP;
+ netfs_root_node->nn_stat.st_mode |= S_IRGRP;
if (underlying_node_stat.st_mode & S_IROTH)
netfs_root_node->nn_stat.st_mode |= S_IXOTH;
}