aboutsummaryrefslogtreecommitdiff
path: root/lib/mount.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2007-06-22 20:41:26 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2007-06-22 20:41:26 +0000
commit37fb19c74ffed25e2dbb0ec3f84c560ff69e5fad (patch)
treefff8e719cfaa650e1641276f648c92cbc8a78338 /lib/mount.c
parent782d77fbf710b6dd072ae205239ec4af68cde3e6 (diff)
lib: fix locking when loading a filesystem module
Diffstat (limited to 'lib/mount.c')
-rw-r--r--lib/mount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mount.c b/lib/mount.c
index aa0c0cb..8c2b048 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -392,6 +392,11 @@ static int fuse_mount_sys(const char *mnt, struct mount_opts *mo,
int fd;
int res;
+ if (!mnt) {
+ fprintf(stderr, "fuse: missing mountpoint\n");
+ return -1;
+ }
+
res = lstat(mnt, &stbuf);
if (res == -1) {
fprintf(stderr ,"fuse: failed to access mountpoint %s: %s\n",
@@ -516,11 +521,6 @@ int fuse_kern_mount(const char *mountpoint, struct fuse_args *args)
int res = -1;
char *mnt_opts = NULL;
- if (!mountpoint) {
- fprintf(stderr, "fuse: missing mountpoint\n");
- return -1;
- }
-
memset(&mo, 0, sizeof(mo));
mo.flags = MS_NOSUID | MS_NODEV;