diff options
Diffstat (limited to 'contrib/fuse-lib/mount-common.c')
| -rw-r--r-- | contrib/fuse-lib/mount-common.c | 15 | 
1 files changed, 11 insertions, 4 deletions
diff --git a/contrib/fuse-lib/mount-common.c b/contrib/fuse-lib/mount-common.c index fd6cce44e3d..cd226fa3141 100644 --- a/contrib/fuse-lib/mount-common.c +++ b/contrib/fuse-lib/mount-common.c @@ -23,7 +23,7 @@   * see the commit log and per-function comments.   */ -#ifndef __NetBSD__ +#ifdef GF_LINUX_HOST_OS  /* FUSE: cherry-picked bd99f9cf */  static int  mtab_needs_update (const char *mnt) @@ -69,9 +69,9 @@ mtab_needs_update (const char *mnt)          return 1;  } -#else /* __NetBSD__ */ +#else /* GF_LINUX_HOST_OS */  #define mtab_needs_update(x) 1 -#endif /* __NetBSD__ */ +#endif /* GF_LINUX_HOST_OS */  /* FUSE: called add_mount_legacy(); R.I.P. as of cbd3a2a8 */  int @@ -246,10 +246,17 @@ fuse_mnt_umount (const char *progname, const char *abs_mnt,          if (res == 0) {                  sigprocmask (SIG_SETMASK, &oldmask, NULL);                  setuid (geteuid ()); +#ifdef GF_LINUX_HOST_OS                  execl ("/bin/umount", "/bin/umount", "-i", rel_mnt, -                      lazy ? "-l" : NULL, NULL); +                       lazy ? "-l" : NULL, NULL);                  GFFUSE_LOGERR ("%s: failed to execute /bin/umount: %s",                                 progname, strerror (errno)); +#else +                execl ("/sbin/umount", "/sbin/umount", rel_mnt, +                       lazy ? "-l" : NULL, NULL); +                GFFUSE_LOGERR ("%s: failed to execute /sbin/umount: %s", +                               progname, strerror (errno)); +#endif /* GF_LINUX_HOST_OS */                  exit (1);          }          res = waitpid (res, &status, 0);  | 
