wok annotate busybox/stuff/busybox-1.7.3-df.u @ rev 2671

Add openssl support for PHP + php-openssl
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Mon Apr 20 15:53:43 2009 +0200 (2009-04-20)
parents
children
rev   line source
pascal@282 1 --- busybox-1.7.3/coreutils/df.c
pascal@282 2 +++ busybox-1.7.3/coreutils/df.c
pascal@282 3 @@ -47,7 +47,7 @@
pascal@282 4
pascal@282 5 #if ENABLE_FEATURE_HUMAN_READABLE
pascal@282 6 opt_complementary = "h-km:k-hm:m-hk";
pascal@282 7 - opt = getopt32(argv, "hmk");
pascal@282 8 + opt = getopt32(argv, "hmik");
pascal@282 9 if (opt & 1) {
pascal@282 10 df_disp_hr = 0;
pascal@282 11 disp_units_hdr = " Size";
pascal@282 12 @@ -56,9 +56,14 @@
pascal@282 13 df_disp_hr = 1024*1024;
pascal@282 14 disp_units_hdr = "1M-blocks";
pascal@282 15 }
pascal@282 16 +#define OPT_INODE 4
pascal@282 17 #else
pascal@282 18 +#define OPT_INODE 1
pascal@282 19 opt = getopt32(argv, "k");
pascal@282 20 #endif
pascal@282 21 + if (opt & OPT_INODE) {
pascal@282 22 + disp_units_hdr = " Inodes";
pascal@282 23 + }
pascal@282 24
pascal@282 25 printf("Filesystem%11s%-15sUsed Available Use%% Mounted on\n",
pascal@282 26 "", disp_units_hdr);
pascal@282 27 @@ -105,6 +110,15 @@
pascal@282 28 }
pascal@282 29
pascal@282 30 if ((s.f_blocks > 0) || !mount_table){
pascal@282 31 + if (opt & OPT_INODE) {
pascal@282 32 + s.f_blocks = s.f_files;
pascal@282 33 + s.f_bavail = s.f_bfree = s.f_ffree;
pascal@282 34 + s.f_bsize = 1;
pascal@282 35 +#if ENABLE_FEATURE_HUMAN_READABLE
pascal@282 36 + if (df_disp_hr)
pascal@282 37 + df_disp_hr = 1;
pascal@282 38 +#endif
pascal@282 39 + }
pascal@282 40 blocks_used = s.f_blocks - s.f_bfree;
pascal@282 41 blocks_percent_used = 0;
pascal@282 42 if (blocks_used + s.f_bavail) {