aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2004-03-02 16:18:30 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2004-03-02 16:18:30 +0000
commit18c1e4dbe101fcd77d810e701412470df8281fcc (patch)
tree3c5f2233e92ba876ea482929ee9b1e11e8f0c002 /lib
parent254d5edabb677d1ad3d4c1423b26a5337657f0e7 (diff)
nicer mount parameters
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/helper.c b/lib/helper.c
index f2ed9b8..0a4948c 100644
--- a/lib/helper.c
+++ b/lib/helper.c
@@ -81,6 +81,8 @@ void fuse_main(int argc, char *argv[], const struct fuse_operations *op)
int fuse_fd;
char *fuse_mountpoint = NULL;
char **fusermount_args = NULL;
+ char *newargs[3];
+ char *basename;
flags = 0;
multithreaded = 1;
@@ -119,6 +121,21 @@ void fuse_main(int argc, char *argv[], const struct fuse_operations *op)
fprintf(stderr, "missing mountpoint\n");
usage(argv[0]);
}
+ if(fusermount_args != NULL)
+ fusermount_args -= 2; /* Hack! */
+ else {
+ fusermount_args = newargs;
+ fusermount_args[2] = NULL;
+ }
+
+ basename = strrchr(argv[0], '/');
+ if(basename == NULL)
+ basename = argv[0];
+ else if(basename[1] != '\0')
+ basename++;
+
+ fusermount_args[0] = "-n";
+ fusermount_args[1] = basename;
fuse_fd = fuse_mount(fuse_mountpoint, (const char **) fusermount_args);
if(fuse_fd == -1)