aboutsummaryrefslogtreecommitdiff
path: root/coreutils/du.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/du.c')
-rw-r--r--coreutils/du.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/coreutils/du.c b/coreutils/du.c
index 947c46e74..d5ce46cf2 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -242,8 +242,11 @@ int du_main(int argc UNUSED_PARAM, char **argv)
* ignore -a. This is consistent with -s being equivalent to -d 0.
*/
#if ENABLE_FEATURE_HUMAN_READABLE
- opt_complementary = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s";
- opt = getopt32(argv, "aHkLsx" "d:+" "lc" "hm", &G.max_print_depth);
+ opt = getopt32(argv, "^"
+ "aHkLsxd:+lchm"
+ "\0" "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s",
+ &G.max_print_depth
+ );
argv += optind;
if (opt & OPT_h_for_humans) {
G.disp_unit = 0;
@@ -255,8 +258,11 @@ int du_main(int argc UNUSED_PARAM, char **argv)
G.disp_unit = 1024;
}
#else
- opt_complementary = "H-L:L-H:s-d:d-s";
- opt = getopt32(argv, "aHkLsx" "d:+" "lc", &G.max_print_depth);
+ opt = getopt32(argv, "^"
+ "aHkLsxd:+lc"
+ "\0" "H-L:L-H:s-d:d-s",
+ &G.max_print_depth
+ );
argv += optind;
#if !ENABLE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
if (opt & OPT_k_kbytes) {