aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/helper.c8
-rw-r--r--lib/mount.c5
3 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index dfa3004..a2d2894 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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");