df: fix -T option when ENABLE_FEATURE_HUMAN_READABLE=0
Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
cd7a38a87d
commit
fbdc167f27
@ -85,12 +85,12 @@ int df_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
enum {
|
enum {
|
||||||
OPT_KILO = (1 << 0),
|
OPT_KILO = (1 << 0),
|
||||||
OPT_POSIX = (1 << 1),
|
OPT_POSIX = (1 << 1),
|
||||||
OPT_ALL = (1 << 2) * ENABLE_FEATURE_DF_FANCY,
|
OPT_FSTYPE = (1 << 2),
|
||||||
OPT_INODE = (1 << 3) * ENABLE_FEATURE_DF_FANCY,
|
OPT_ALL = (1 << 3) * ENABLE_FEATURE_DF_FANCY,
|
||||||
OPT_BSIZE = (1 << 4) * ENABLE_FEATURE_DF_FANCY,
|
OPT_INODE = (1 << 4) * ENABLE_FEATURE_DF_FANCY,
|
||||||
OPT_HUMAN = (1 << (2 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE,
|
OPT_BSIZE = (1 << 5) * ENABLE_FEATURE_DF_FANCY,
|
||||||
OPT_MEGA = (1 << (3 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE,
|
OPT_HUMAN = (1 << (3 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE,
|
||||||
OPT_FSTYPE = (1 << (4 + 3*ENABLE_FEATURE_DF_FANCY)),
|
OPT_MEGA = (1 << (4 + 3*ENABLE_FEATURE_DF_FANCY)) * ENABLE_FEATURE_HUMAN_READABLE,
|
||||||
};
|
};
|
||||||
const char *disp_units_hdr = NULL;
|
const char *disp_units_hdr = NULL;
|
||||||
char *chp;
|
char *chp;
|
||||||
@ -102,10 +102,9 @@ int df_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
#elif ENABLE_FEATURE_HUMAN_READABLE
|
#elif ENABLE_FEATURE_HUMAN_READABLE
|
||||||
opt_complementary = "k-m:m-k";
|
opt_complementary = "k-m:m-k";
|
||||||
#endif
|
#endif
|
||||||
opt = getopt32(argv, "kP"
|
opt = getopt32(argv, "kPT"
|
||||||
IF_FEATURE_DF_FANCY("aiB:")
|
IF_FEATURE_DF_FANCY("aiB:")
|
||||||
IF_FEATURE_HUMAN_READABLE("hm")
|
IF_FEATURE_HUMAN_READABLE("hm")
|
||||||
"T"
|
|
||||||
IF_FEATURE_DF_FANCY(, &chp));
|
IF_FEATURE_DF_FANCY(, &chp));
|
||||||
if (opt & OPT_MEGA)
|
if (opt & OPT_MEGA)
|
||||||
df_disp_hr = 1024*1024;
|
df_disp_hr = 1024*1024;
|
||||||
|
Loading…
Reference in New Issue
Block a user