]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/busybox/busybox-1.00/df.patch
busybox: fix df.patch
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / busybox / busybox-1.00 / df.patch
1 --- busybox-1.00/coreutils/df.c.orig    2006-07-14 09:50:47.914912750 -0400
2 +++ busybox-1.00/coreutils/df.c 2006-07-14 09:52:32.613456000 -0400
3 @@ -60,6 +60,7 @@
4         struct statfs s;
5         static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */
6         const char *disp_units_hdr = hdr_1k;
7 +       int root_done = 0;
8  
9  #ifdef CONFIG_FEATURE_HUMAN_READABLE
10         bb_opt_complementaly = "h-km:k-hm:m-hk";
11 @@ -125,14 +126,14 @@
12                                                                            ) / (blocks_used + s.f_bavail);
13                         }
14  
15 -                       if (strcmp(device, "rootfs") == 0) {
16 -                               continue;
17 -                       } else if (strcmp(device, "/dev/root") == 0) {
18 +                       if (strcmp(device, "/dev/root") == 0 || strcmp(device, "rootfs") == 0) {
19 +                               if (root_done) continue;
20                                 /* Adjusts device to be the real root device,
21                                 * or leaves device alone if it can't find it */
22                                 if ((device = find_real_root_device_name()) == NULL) {
23                                         goto SET_ERROR;
24                                 }
25 +                               root_done = 1;
26                         }
27  
28  #ifdef CONFIG_FEATURE_HUMAN_READABLE