| Anonymous | Login | Signup for a new account | 11-10-2008 11:02 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000894 | [BusyBox] Other | minor | always | 06-02-06 07:55 | 11-15-07 01:46 | ||||
| Reporter | aric | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 1.1.x | ||||||
| Summary | 0000894: df.c Does not report info for "rootfs" | ||||||||
| Description | df.c is explicitly set up to ignore "rootfs", and so if you df -h /, you get nothing. I think it was designed to skip the multiple entries of the root mount that appear in /proc/mounts and /etc/mtab, but it doesn't take care of the case when a path is specified. | ||||||||
| Additional Information |
Here is a patch to fix it: {{{ --- coreutils/df.c.original 2006-03-22 16:16:21.000000000 -0500 +++ coreutils/df.c 2006-06-02 10:52:54.000000000 -0400 @@ -60,6 +60,7 @@ struct statfs s; static const char hdr_1k[] = "1k-blocks"; /* default display is kilobytes */ const char *disp_units_hdr = hdr_1k; + int root_done = 0; #ifdef CONFIG_FEATURE_HUMAN_READABLE bb_opt_complementally = "h-km:k-hm:m-hk"; @@ -125,14 +126,14 @@ ) / (blocks_used + s.f_bavail); } - if (strcmp(device, "rootfs") == 0) { - continue; - } else if (strcmp(device, "/dev/root") == 0) { + if (strcmp(device, "/dev/root") == 0 || strcmp(device, "rootfs") == 0) { + if(root_done) continue; /* Adjusts device to be the real root device, * or leaves device alone if it can't find it */ if ((device = find_block_device("/")) == NULL) { goto SET_ERROR; } + root_done = 1; } #ifdef CONFIG_FEATURE_HUMAN_READABLE }}} |
||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0001393) aric 06-02-06 07:58 |
That patch didn't look so good, so I attached a file. |
|
(0002920) vda 11-15-07 01:46 |
fixed in svn |
| Copyright © 2000 - 2006 Mantis Group |