diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2007-04-27 18:08:15 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2007-04-27 18:08:15 +0000 |
commit | ccd1fa686cc1fc2faf067c8ceb10b90950175cc9 (patch) | |
tree | fee61fb474e225010e173e514015b0299bf093e3 /util | |
parent | ccf0be03c3f6ec094b18c53c0606dafadb1e5423 (diff) | |
download | android_external_fuse-ccd1fa686cc1fc2faf067c8ceb10b90950175cc9.tar.gz android_external_fuse-ccd1fa686cc1fc2faf067c8ceb10b90950175cc9.tar.bz2 android_external_fuse-ccd1fa686cc1fc2faf067c8ceb10b90950175cc9.zip |
libfuse: call umount(8) directly...
Diffstat (limited to 'util')
-rw-r--r-- | util/fusermount.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/util/fusermount.c b/util/fusermount.c index 16a9f9a..8f69599 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -73,35 +73,6 @@ static void restore_privs(void) } } -static int do_unmount(const char *mnt, int quiet, int lazy) -{ - int res; - int status; - - (void) quiet; - res = fork(); - if (res == -1) { - perror("fork"); - return -1; - } - if (res == 0) { - setuid(geteuid()); - execl("/bin/umount", "/bin/umount", "-i", mnt, lazy ? "-l" : NULL, - NULL); - perror("execl /bin/umount"); - exit(1); - } - res = waitpid(res, &status, 0); - if (res == -1) { - perror("waitpid"); - return -1; - } - if (status != 0) - return -1; - - return 0; -} - #ifndef IGNORE_MTAB static int add_mount(const char *fsname, const char *mnt, const char *type, const char *opts) @@ -164,7 +135,7 @@ static int unmount_fuse(const char *mnt, int quiet, int lazy) } } - return do_unmount(mnt, quiet, lazy); + return fuse_mnt_umount(progname, mnt, lazy); } static int count_fuse_fs(void) @@ -205,7 +176,7 @@ static int add_mount(const char *fsname, const char *mnt, const char *type, static int unmount_fuse(const char *mnt, int quiet, int lazy) { - return do_unmount(mnt, quiet, lazy); + return fuse_mnt_umount(progname, mnt, lazy); } #endif /* IGNORE_MTAB */ |