[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] [BUG & PATCH]in find_real_root_device_name
From: Tito <farmatito () tiscali ! it>
Date: 2004-07-28 0:52:59
Message-ID: 200407280254.18853.farmatito () tiscali ! it
[Download RAW message or body]
On Tuesday 27 July 2004 OO:44, Tito wrote:
> 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
>
Just one more idea about this, maybe we could also do a
continue if myname is a link rather than do strcmp(myname,"root")
as the root device is the file the link points to.
A late night thought after a couple of beers.
Tito
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic