diff options
author | Georgi Valkov <gvalkov@gmail.com> | 2025-06-15 15:34:57 +0300 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-08-06 20:53:16 +0200 |
commit | 6d9ff1c57c1c3107c3e012373f28b871cd6ef2c9 (patch) | |
tree | 92156fb81303247e3f0d4a6708973aa4678a54df | |
parent | b64c23091e5505fa4a3e579ac4caa676a6f3cbab (diff) | |
download | libfuse-6d9ff1c57c1c3107c3e012373f28b871cd6ef2c9.tar.gz |
mount_util.c: check if utab exists before update
Do not attempt to update /run/mount/utab if it doesn't exist.
Note: if this path ever changes, utab updates will break.
Fixes the following error when mounting iPhone using ifuse:
ifuse /mnt --container com.httpstorm.httpstorm
mount: mounting ifuse on /mnt failed: Invalid argument
On OpenWRT by default mount-utils is not installed and utab
does not exist. /bin/mount is a symlink to /bin/busybox and
does not support updating of utab. If mount-utils is installed:
/run/mount/ exists, but does not contain utab.
The mount-utils instance is under /usr/bin/mount, so a hard-coded
call to /bin/mount will still fail. Using /usr/bin/mount succeeds
but does not create utab.
[1] https://github.com/libfuse/libfuse/pull/1247
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
(cherry picked from commit 3793b1748ad151c8043dee1db198fffa3dbb5a67)
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
-rw-r--r-- | lib/mount_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mount_util.c b/lib/mount_util.c index 089ca45..f19dfb4 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -75,6 +75,10 @@ static int mtab_needs_update(const char *mnt) if (err == EROFS) return 0; + + res = access("/run/mount/utab", F_OK); + if (res == -1) + return 0; } return 1; |