diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-21 07:59:37 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-21 07:59:37 +0000 |
commit | 9b813af8631729cf7f626f0cbac08863bb315863 (patch) | |
tree | 1ccd7493b978e83e85f27063d88045dbdddec7bb /lib/mount.c | |
parent | e2aa2e243d729e29ad67f1b30aa3392ca9a9cdb2 (diff) | |
download | libfuse-9b813af8631729cf7f626f0cbac08863bb315863.tar.gz |
fixes
Diffstat (limited to 'lib/mount.c')
-rw-r--r-- | lib/mount.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/mount.c b/lib/mount.c index 86ad2be..01081bb 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -72,8 +72,8 @@ void fuse_unmount(const char *mountpoint) const char *mountprog = FUSERMOUNT_PROG; char umount_cmd[1024]; - snprintf(umount_cmd, sizeof(umount_cmd) - 1, "%s -u -q -z %s", mountprog, - mountpoint); + snprintf(umount_cmd, sizeof(umount_cmd) - 1, "%s -u -q -z -- %s", + mountprog, mountpoint); umount_cmd[sizeof(umount_cmd) - 1] = '\0'; system(umount_cmd); @@ -106,8 +106,17 @@ int fuse_mount(const char *mountpoint, const char *opts) if(pid == 0) { char env[10]; - const char *argv[] = {mountprog, opts ? "-o" : mountpoint, opts, - mountpoint, NULL}; + const char *argv[32]; + int a = 0; + + argv[a++] = mountprog; + if (opts) { + argv[a++] = "-o"; + argv[a++] = opts; + } + argv[a++] = "--"; + argv[a++] = mountpoint; + argv[a++] = NULL; close(fds[1]); fcntl(fds[0], F_SETFD, 0); |