1
0
forked from pool/util-linux
util-linux/util-linux-2.12r-mount-mtab-update.patch

30 lines
741 B
Diff

--- mount/mount.c
+++ mount/mount.c
@@ -805,6 +805,7 @@
int mnt5_res = 0; /* only for gcc */
int mnt_err;
int flags;
+ int isroot;
char *extra_opts; /* written in mtab */
char *mount_opts; /* actually used on system call */
const char *opts, *spec, *node, *types;
@@ -913,13 +914,17 @@
if (loop)
opt_loopdev = loopdev;
- update_mtab_entry(loop ? loopfile : spec,
+ isroot = (streq (node, "/") || streq (node, "root") ||
+ streq (node, "rootfs"));
+ if (!isroot) {
+ update_mtab_entry(loop ? loopfile : spec,
node,
types ? types : "unknown",
fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user),
flags,
freq,
pass);
+ }
block_signals (SIG_UNBLOCK);
res = 0;