diff options
Diffstat (limited to 'lib/mount_util.c')
-rw-r--r-- | lib/mount_util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/mount_util.c b/lib/mount_util.c index 56ed85a..95e038f 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -352,3 +352,16 @@ int fuse_mnt_check_fuseblk(void) fclose(f); return 0; } + +int fuse_mnt_parse_fuse_fd(const char *mountpoint) +{ + int fd = -1; + int len = 0; + + if (sscanf(mountpoint, "/dev/fd/%u%n", &fd, &len) == 1 && + len == strlen(mountpoint)) { + return fd; + } + + return -1; +} |