[BusyBox-cvs] busybox/util-linux mount.c,1.110,1.111 umount.c,1.60,1.61

Erik Andersen andersen at busybox.net
Fri Jun 20 09:36:53 UTC 2003


Update of /var/cvs/busybox/util-linux
In directory winder:/tmp/cvs-serv15650/util-linux

Modified Files:
	mount.c umount.c 
Log Message:
Somewhere in the 2.4.x kernel series, /proc/mounts was changed to display a
"rootfs" entry as well as the traditional "/dev/root" entry.  This caused
applets such as mount and df to display two root filesystem entries....

This teaches the relevant utilities to ignore the "rootfs" entry.
 -Erik


Index: mount.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/mount.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- mount.c	19 Mar 2003 09:13:01 -0000	1.110
+++ mount.c	20 Jun 2003 09:36:49 -0000	1.111
@@ -334,7 +334,9 @@
 		while ((m = getmntent(mountTable)) != 0) {
 			char *blockDevice = m->mnt_fsname;
 
-			if (strcmp(blockDevice, "/dev/root") == 0) {
+			if (strcmp(blockDevice, "rootfs") == 0) {
+				continue;
+			} else if (strcmp(blockDevice, "/dev/root") == 0) {
 				blockDevice = find_real_root_device_name(blockDevice);
 			}
 			if (!onlytype || (strcmp(m->mnt_type, onlytype) == 0)) {

Index: umount.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/umount.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- umount.c	19 Mar 2003 09:13:01 -0000	1.60
+++ umount.c	20 Jun 2003 09:36:49 -0000	1.61
@@ -111,7 +111,9 @@
 				return cur->mountpt;
 			} else {
 #if !defined CONFIG_FEATURE_MTAB_SUPPORT
-				if (strcmp(cur->device, "/dev/root") == 0) {
+				if (strcmp(cur->device, "rootfs") == 0) {
+					continue;
+				} else if (strcmp(cur->device, "/dev/root") == 0) {
 					/* Adjusts device to be the real root device,
 					 * or leaves device alone if it can't find it */
 					cur->device = find_real_root_device_name(cur->device);



More information about the busybox-cvs mailing list