[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] find mount point of char devices
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2012-01-18 0:50:11
Message-ID: 201201180150.11355.vda.linux () googlemail ! com
[Download RAW message or body]

On Monday 09 January 2012 11:10, Javier Viguera wrote:
> Hi all,
> 
> I found a corner case in 'df' command when using it with an UBIFS partition.
> 
> If i use 'df' without arguments, i got the correct values:
> 
> / # df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/root             72091984  12360980  56068924  18% /
> devtmpfs                115236         4    115232   0% /dev
> tmpfs                    28672        32     28640   0% /tmp
> /dev/ubi0_0             360268     18348    341920   5% /tmp/mnt/userfs
> 
> while if i just pass the ubi volume i got the wrong answer:
> 
> / # df /dev/ubi0_0
> Filesystem           1K-blocks      Used Available Use% Mounted on
> devtmpfs                115236         4    115232   0% /dev
> 
> 
> Coreutils 'df' seems to work properly:
> 
> / # /df --version
> df (GNU coreutils) 8.15
> ...
> 
> / # /df /dev/ubi0_0
> Filesystem     1K-blocks  Used Available Use% Mounted on
> /dev/ubi0_0       360268 18348    341920   6% /tmp/mnt/userfs
> 
> I tracked down the problem in busybox to the 'find_mount_point' function 
> where it checks if the device to find the mountpoint is a block device 
> or not. On UBI systems the volume to mount is a 'char' device:
> 
> / # ls -l /dev/ubi0_0
> crw-rw----    1 root     root      249,   1 Jan  4 21:42 /dev/ubi0_0
> 
> A basic patch that fixes the problem is attached (against current 
> master), but I'm not sure if this is the correct fix or not, so i just 
> send it here to review and consider applying.


Looks ok to me.

Applied, thanks.

-- 
vda

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic