diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-10 09:54:41 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-10 09:54:41 +0000 |
commit | bcc5385cc146c45bfe08e8351e3dcdd1d6354fee (patch) | |
tree | 6c9660f734255bb655c97bb81441fdfcccb71c5b | |
parent | 4ec0681e0576c6892f7d919d14bf6188c728b9f8 (diff) | |
download | libfuse-bcc5385cc146c45bfe08e8351e3dcdd1d6354fee.tar.gz |
fix
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/helper.c | 8 | ||||
-rw-r--r-- | lib/mount.c | 5 |
3 files changed, 12 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2005-11-10 Miklos Szeredi <miklos@szeredi.hu> + + * Moved mountpoint argument checking from fuse_parse_cmdline() to + fuse_mount() in preparation to FreeBSD merge. + 2005-11-08 Miklos Szeredi <miklos@szeredi.hu> * Remove unneeded close() from fuse_teardown(). Spotted by Csaba diff --git a/lib/helper.c b/lib/helper.c index ae43c87..89cd7a8 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -274,12 +274,6 @@ static int fuse_parse_cmdline(int argc, const char *argv[], char **kernel_opts, goto err; } } - - if (*mountpoint == NULL) { - fprintf(stderr, "missing mountpoint\n"); - fprintf(stderr, "see `%s -h' for usage\n", argv[0]); - goto err; - } return 0; err: @@ -371,6 +365,8 @@ struct fuse *fuse_setup_compat2(int argc, char *argv[], void fuse_teardown(struct fuse *fuse, int fd, char *mountpoint) { + (void) fd; + if (fuse_instance != fuse) fprintf(stderr, "fuse: fuse_teardown() with unknown fuse object\n"); else diff --git a/lib/mount.c b/lib/mount.c index f7a5299..62e2b4a 100644 --- a/lib/mount.c +++ b/lib/mount.c @@ -86,6 +86,11 @@ int fuse_mount(const char *mountpoint, const char *opts) int res; int rv; + if (!mountpoint) { + fprintf(stderr, "fuse: missing mountpoint\n"); + return -1; + } + res = socketpair(PF_UNIX, SOCK_STREAM, 0, fds); if(res == -1) { perror("fuse: socketpair() failed"); |