From 0bef21e8543dda7f02b5f4cb3008a7292d249842 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Fri, 7 Oct 2016 20:57:53 -0700 Subject: Removed -o nonempty option This brings the default behavior in-line with that of the regular `mount` command. --- lib/mount_util.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'lib/mount_util.c') diff --git a/lib/mount_util.c b/lib/mount_util.c index a23ab0b..8b64ca2 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -333,39 +333,6 @@ char *fuse_mnt_resolve_path(const char *progname, const char *orig) return dst; } -int fuse_mnt_check_empty(const char *progname, const char *mnt, - mode_t rootmode, off_t rootsize) -{ - int isempty = 1; - - if (S_ISDIR(rootmode)) { - struct dirent *ent; - DIR *dp = opendir(mnt); - if (dp == NULL) { - fprintf(stderr, - "%s: failed to open mountpoint for reading: %s\n", - progname, strerror(errno)); - return -1; - } - while ((ent = readdir(dp)) != NULL) { - if (strcmp(ent->d_name, ".") != 0 && - strcmp(ent->d_name, "..") != 0) { - isempty = 0; - break; - } - } - closedir(dp); - } else if (rootsize) - isempty = 0; - - if (!isempty) { - fprintf(stderr, "%s: mountpoint is not empty\n", progname); - fprintf(stderr, "%s: if you are sure this is safe, use the 'nonempty' mount option\n", progname); - return -1; - } - return 0; -} - int fuse_mnt_check_fuseblk(void) { char buf[256]; -- cgit v1.2.3