1
0
forked from pool/util-linux
util-linux/util-linux-2.12r-mount_mtab_update.patch

23 lines
629 B
Diff
Raw Normal View History

Index: mount/mount.c
===================================================================
--- mount/mount.c.orig
+++ mount/mount.c
@@ -954,11 +954,16 @@ retry_nfs:
}
if (fake || mnt5_res == 0) {
+ int isroot;
+
/* Mount succeeded, report this (if verbose) and write mtab entry. */
if (loop)
opt_loopdev = loopdev;
- if (!(mounttype & MS_PROPAGATION)) {
+ isroot = (streq(node, "/") || streq(node, "root") ||
+ streq(node, "rootfs"));
+
+ if (!(mounttype & MS_PROPAGATION) && !isroot) {
update_mtab_entry(loop ? loopfile : spec,
node,
types ? types : "unknown",