forked from pool/util-linux
20 lines
614 B
Diff
20 lines
614 B
Diff
Index: mount/mount.c
|
|
===================================================================
|
|
--- mount/mount.c.orig
|
|
+++ mount/mount.c
|
|
@@ -1112,9 +1112,13 @@ try_mount_one (const char *spec0, const
|
|
}
|
|
|
|
if (fake || mnt5_res == 0) {
|
|
+ int isroot;
|
|
+
|
|
/* Mount succeeded, report this (if verbose) and write mtab entry. */
|
|
+ isroot = (streq(node, "/") || streq(node, "root") ||
|
|
+ streq(node, "rootfs"));
|
|
|
|
- if (!(mounttype & MS_PROPAGATION)) {
|
|
+ if (!(mounttype & MS_PROPAGATION) && !isroot) {
|
|
update_mtab_entry(loop ? loopfile : spec,
|
|
node,
|
|
types ? types : "unknown",
|