
Loading…
don't try to update /etc/mtab unless it is a regular file. #16
Merged
+13
−0
pipcet
commented
|
|
pipcet |
don't try to update /etc/mtab unless it is a regular file.
…
That's what the other mount helpers appear to be doing. |
a03d9ee
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Commits on Apr 18, 2015
-
don't try to update /etc/mtab unless it is a regular file. …
pipcet authoredThat's what the other mount helpers appear to be doing.
This page is out of date. Refresh to see the latest.
13
utils/diodmount.c
That's what the other mount helpers appear to be doing.
Debian switched to keeping a symlink to /proc/mounts in /etc/mtab, but didn't modify setmntent(3) to handle that case gracefully, so the only way to avoid error messages on Debian systems appears to be to lstat() /etc/mtab and check it's not a symbolic link.
libmount goes further and keeps some mount data in /run/mount/utab or $LIBMOUNT_UTAB, but I don't think we need to do that.