diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-02-03 09:39:49 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-02-03 09:47:48 +0000 |
commit | 61a1a2b71c4811b9d6233a43db74229b9364f0c6 (patch) | |
tree | b0054996ec4325f97f020ec3cf937b818d7f3232 /python/guestfs-py.c | |
parent | f2a4020caf0bc3dd63e9eae95dfc1814f051f87e (diff) | |
download | libguestfs-61a1a2b71c4811b9d6233a43db74229b9364f0c6.tar.gz libguestfs-61a1a2b71c4811b9d6233a43db74229b9364f0c6.tar.xz libguestfs-61a1a2b71c4811b9d6233a43db74229b9364f0c6.zip |
daemon: Parse /proc/mounts instead of /etc/mtab
Since Fedora util-linux 2.19, the %post script does:
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
We are no longer running %post scripts, so this means that /etc/mtab
is a plain file in the appliance. Usual 'mount' still updates it, but
for some reason mount.ntfs does *not* update it in Fedora 15, meaning
that you couldn't mount and then operate on NTFS partitions.
It seems better to always parse /proc/mounts (ie. what the kernel
thinks is mounted) unconditionally, rather than relying on the
capriciousness of the external mount command.
Therefore, parse /proc/mounts instead of /etc/mtab, but add a note
saying that in future we should really be parsing
/proc/self/mountinfo, but that needs a custom parser, and the format
is rather tricky:
http://lxr.linux.no/#linux+v2.6.37/Documentation/filesystems/proc.txt#L1462
Diffstat (limited to 'python/guestfs-py.c')
0 files changed, 0 insertions, 0 deletions