]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/busybox/busybox-1.00/df.patch
busybox: apply patch to fix "df <path>".
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / busybox / busybox-1.00 / df.patch
1 --- busybox-1.00/coreutils/df.c 2004-08-02 20:14:01.000000000 -0400
2 +++ busybox-1.00/coreutils/df.c.new     2006-06-29 10:56:43.256528750 -0400
3 @@ -117,6 +117,8 @@
4                 }
5  
6                 if ((s.f_blocks > 0) || !mount_table){
7 +                       int root_done = 0;
8 +
9                         blocks_used = s.f_blocks - s.f_bfree;
10                         blocks_percent_used = 0;
11                         if (blocks_used + s.f_bavail) {
12 @@ -125,14 +127,14 @@
13                                                                            ) / (blocks_used + s.f_bavail);
14                         }
15  
16 -                       if (strcmp(device, "rootfs") == 0) {
17 -                               continue;
18 -                       } else if (strcmp(device, "/dev/root") == 0) {
19 +                       if (strcmp(device, "/dev/root") == 0 || strcmp(device, "rootfs") == 0) {
20 +                               if (root_done) continue;
21                                 /* Adjusts device to be the real root device,
22                                 * or leaves device alone if it can't find it */
23                                 if ((device = find_real_root_device_name()) == NULL) {
24                                         goto SET_ERROR;
25                                 }
26 +                               root_done = 1;
27                         }
28  
29  #ifdef CONFIG_FEATURE_HUMAN_READABLE