[BusyBox] [BUG & PATCH]in find_real_root_device_name
Tito
farmatito at tiscali.it
Tue Jul 27 22:44:24 UTC 2004
Hi ,
by looking further in find_real_root_device_name() function in libbb
i've found something that seems a bug to me.
If parsing a /dev directory that contains an entry named root
(in my case a symbolic link to ide/host0/bus0/target1/lun0/part1 )
the function returns /dev/root rather than /dev/hdb1.
A fix could be:
------------------------------------------------------------------------------------
--- find_root_device.c.orig 2004-03-15 08:28:42.000000000 +0000
+++ find_root_device.c 2004-07-27 22:36:58.558314064 +0000
@@ -54,7 +54,9 @@
* would get a false positive on ".." */
if (myname[0] == '.' && myname[1] == '.' && !myname[2])
continue;
-
+ if (strcmp(myname,"root")==0)
+ continue;
+
fileName = concat_path_file("/dev", myname);
/* Some char devices have the same dev_t as block
---------------------------------------------------------------------------------------
I've tested this with bb's df and on my box it works .
Ciao,
Tito
More information about the busybox
mailing list