aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <miklos@szeredi.hu>2005-09-29 10:06:27 +0000
committerGravatar Miklos Szeredi <miklos@szeredi.hu>2005-09-29 10:06:27 +0000
commitdb016e0cb91e06a4ecfd5f62151ead6dba8a5e71 (patch)
tree5ba8c45388d44d0f382da0e4a9414ed062bec7d9 /util
parent352009371aa7244b96c1bf142d19f49340739542 (diff)
fix
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index 87dfaa8..0330cf9 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -774,18 +774,20 @@ static int try_open(const char *dev, char **devp, int silent)
static int try_open_fuse_device(char **devp)
{
int fd;
+ int err;
drop_privs();
- fd = try_open(FUSE_DEV_NEW, devp, 1);
+ fd = try_open(FUSE_DEV_NEW, devp, 0);
restore_privs();
if (fd >= 0)
return fd;
+ err = fd;
fd = try_open(FUSE_DEV_OLD, devp, 1);
if (fd >= 0)
return fd;
- return -1;
+ return err;
}
static int open_fuse_device(char **devp)
@@ -794,8 +796,10 @@ static int open_fuse_device(char **devp)
if (fd >= 0)
return fd;
- fprintf(stderr, "%s: fuse device not found, try 'modprobe fuse' first\n",
- progname);
+ if (fd == -2)
+ fprintf(stderr,
+ "%s: fuse device not found, try 'modprobe fuse' first\n",
+ progname);
return -1;
}