aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-07 20:57:53 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-10-15 18:53:45 -0700
commit0bef21e8543dda7f02b5f4cb3008a7292d249842 (patch)
tree2ac14db6288588ed28d691053be1f1d5e6624965 /util
parent86b261490611ffb0ccd46d3f0f2ae9eca9ae98af (diff)
Removed -o nonempty option
This brings the default behavior in-line with that of the regular `mount` command.
Diffstat (limited to 'util')
-rw-r--r--util/fusermount.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index b226fbd..8ba4ebf 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -714,7 +714,7 @@ static int get_string_opt(const char *s, unsigned len, const char *opt,
static int do_mount(const char *mnt, char **typep, mode_t rootmode,
int fd, const char *opts, const char *dev, char **sourcep,
- char **mnt_optsp, off_t rootsize)
+ char **mnt_optsp)
{
int res;
int flags = MS_NOSUID | MS_NODEV;
@@ -726,7 +726,6 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
char *subtype = NULL;
char *source = NULL;
char *type = NULL;
- int check_empty = 1;
int blkdev = 0;
optbuf = (char *) malloc(strlen(opts) + 128);
@@ -759,8 +758,6 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
goto err;
}
blkdev = 1;
- } else if (opt_eq(s, len, "nonempty")) {
- check_empty = 0;
} else if (opt_eq(s, len, "auto_unmount")) {
auto_unmount = 1;
} else if (!begins_with(s, "fd=") &&
@@ -813,10 +810,6 @@ static int do_mount(const char *mnt, char **typep, mode_t rootmode,
sprintf(d, "fd=%i,rootmode=%o,user_id=%u,group_id=%u",
fd, rootmode, getuid(), getgid());
- if (check_empty &&
- fuse_mnt_check_empty(progname, mnt, rootmode, rootsize) == -1)
- goto err;
-
source = malloc((fsname ? strlen(fsname) : 0) +
(subtype ? strlen(subtype) : 0) + strlen(dev) + 32);
@@ -1082,8 +1075,7 @@ static int mount_fuse(const char *mnt, const char *opts)
restore_privs();
if (res != -1)
res = do_mount(real_mnt, &type, stbuf.st_mode & S_IFMT,
- fd, opts, dev, &source, &mnt_opts,
- stbuf.st_size);
+ fd, opts, dev, &source, &mnt_opts);
} else
restore_privs();
@@ -1292,7 +1284,7 @@ int main(int argc, char *argv[])
return 0;
/* Become a daemon and wait for the parent to exit or die.
- ie For the control socket to get closed.
+ ie For the control socket to get closed.
btw We don't want to use daemon() function here because
it forks and messes with the file descriptors. */
setsid();