2007-04-12 18:31:42 +02:00
|
|
|
Index: mount/mount.c
|
|
|
|
===================================================================
|
|
|
|
--- mount/mount.c.orig
|
2006-12-19 00:18:10 +01:00
|
|
|
+++ mount/mount.c
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -842,6 +842,7 @@ try_mount_one (const char *spec0, const
|
2006-12-19 00:18:10 +01:00
|
|
|
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;
|
2007-04-12 18:31:42 +02:00
|
|
|
@@ -942,13 +943,17 @@ retry_nfs:
|
2006-12-19 00:18:10 +01:00
|
|
|
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;
|