wok view busybox/stuff/busybox-1.7.3-df.u @ rev 2511
QtDesigner-bluefish: update depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 16 15:53:02 2009 +0000 (2009-03-16) |
parents | |
children |
line source
1 --- busybox-1.7.3/coreutils/df.c
2 +++ busybox-1.7.3/coreutils/df.c
3 @@ -47,7 +47,7 @@
5 #if ENABLE_FEATURE_HUMAN_READABLE
6 opt_complementary = "h-km:k-hm:m-hk";
7 - opt = getopt32(argv, "hmk");
8 + opt = getopt32(argv, "hmik");
9 if (opt & 1) {
10 df_disp_hr = 0;
11 disp_units_hdr = " Size";
12 @@ -56,9 +56,14 @@
13 df_disp_hr = 1024*1024;
14 disp_units_hdr = "1M-blocks";
15 }
16 +#define OPT_INODE 4
17 #else
18 +#define OPT_INODE 1
19 opt = getopt32(argv, "k");
20 #endif
21 + if (opt & OPT_INODE) {
22 + disp_units_hdr = " Inodes";
23 + }
25 printf("Filesystem%11s%-15sUsed Available Use%% Mounted on\n",
26 "", disp_units_hdr);
27 @@ -105,6 +110,15 @@
28 }
30 if ((s.f_blocks > 0) || !mount_table){
31 + if (opt & OPT_INODE) {
32 + s.f_blocks = s.f_files;
33 + s.f_bavail = s.f_bfree = s.f_ffree;
34 + s.f_bsize = 1;
35 +#if ENABLE_FEATURE_HUMAN_READABLE
36 + if (df_disp_hr)
37 + df_disp_hr = 1;
38 +#endif
39 + }
40 blocks_used = s.f_blocks - s.f_bfree;
41 blocks_percent_used = 0;
42 if (blocks_used + s.f_bavail) {