[BusyBox-cvs] busybox/coreutils df.c,1.53,1.54

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


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

Modified Files:
	df.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: df.c
===================================================================
RCS file: /var/cvs/busybox/coreutils/df.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- df.c	20 Jun 2003 09:01:52 -0000	1.53
+++ df.c	20 Jun 2003 09:36:48 -0000	1.54
@@ -126,7 +126,9 @@
 									   ) / (blocks_used + s.f_bavail);
 			}
 			
-			if (strcmp(device, "/dev/root") == 0) {
+			if (strcmp(device, "rootfs") == 0) {
+				continue;
+			} else if (strcmp(device, "/dev/root") == 0) {
 				/* Adjusts device to be the real root device,
 				* or leaves device alone if it can't find it */
 				if ((device = find_real_root_device_name(device)) == NULL) {



More information about the busybox-cvs mailing list