aboutsummaryrefslogtreecommitdiff
path: root/lib/mount_bsd.c
diff options
context:
space:
mode:
authorGravatar Nikolaus Rath <Nikolaus@rath.org>2016-09-27 20:38:59 -0700
committerGravatar Nikolaus Rath <Nikolaus@rath.org>2016-09-27 20:45:26 -0700
commiteb61e2b18fe969002a8221cc2ad1e251474e0c94 (patch)
treeaf0f5907fa2082e108bd505203da0b1d841b88f7 /lib/mount_bsd.c
parent44346a9885cb4567ea29c4cb089b1f249c0e46c2 (diff)
Dropped fuse_unmount_compat22
This function was for backwards compatibility in FUSE 2.x, and is no longer exposed by FUSE 3.
Diffstat (limited to 'lib/mount_bsd.c')
-rw-r--r--lib/mount_bsd.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/mount_bsd.c b/lib/mount_bsd.c
index 6a7c958..3d6b12f 100644
--- a/lib/mount_bsd.c
+++ b/lib/mount_bsd.c
@@ -144,53 +144,6 @@ static int fuse_mount_opt_proc(void *data, const char *arg, int key,
return 1;
}
-void fuse_unmount_compat22(const char *mountpoint)
-{
- char dev[128];
- char *ssc, *umount_cmd;
- FILE *sf;
- int rv;
- char seekscript[] =
- /* error message is annoying in help output */
- "exec 2>/dev/null; "
- "/usr/bin/fstat " FUSE_DEV_TRUNK "* | "
- "/usr/bin/awk 'BEGIN{ getline; if (! ($3 == \"PID\" && $10 == \"NAME\")) exit 1; }; "
- " { if ($3 == %d) print $10; }' | "
- "/usr/bin/sort | "
- "/usr/bin/uniq | "
- "/usr/bin/awk '{ i += 1; if (i > 1){ exit 1; }; printf; }; END{ if (i == 0) exit 1; }'";
-
- (void) mountpoint;
-
- /*
- * If we don't know the fd, we have to resort to the scripted
- * solution -- iterating over the fd-s is unpractical, as we
- * don't know how many of open files we have. (This could be
- * looked up in procfs -- however, that's optional on FBSD; or
- * read out from the kmem -- however, that's bound to
- * privileges (in fact, that's what happens when we call the
- * setgid kmem fstat(1) utility).
- */
- if (asprintf(&ssc, seekscript, getpid()) == -1)
- return;
-
- errno = 0;
- sf = popen(ssc, "r");
- free(ssc);
- if (! sf)
- return;
-
- fgets(dev, sizeof(dev), sf);
- rv = pclose(sf);
- if (rv)
- return;
-
- if (asprintf(&umount_cmd, "/sbin/umount %s", dev) == -1)
- return;
- system(umount_cmd);
- free(umount_cmd);
-}
-
static void do_unmount(char *dev, int fd)
{
char device_path[SPECNAMELEN + 12];