diff options
author | Ron Yorston <rmy@pobox.com> | 2019-02-16 10:22:31 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-02-19 17:08:39 +0100 |
commit | e563f9e851c78f5c13cb9828ddb11ca981fd6331 (patch) | |
tree | 0e277c457ebd0bcc24712c66bc964ec9e26e72aa /coreutils | |
parent | 8502fa8747e962f69084be09ff8b930e0fb0c449 (diff) | |
download | busybox-w32-e563f9e851c78f5c13cb9828ddb11ca981fd6331.tar.gz busybox-w32-e563f9e851c78f5c13cb9828ddb11ca981fd6331.tar.bz2 busybox-w32-e563f9e851c78f5c13cb9828ddb11ca981fd6331.zip |
du: don't count duplicate arguments. Closes 5288
Since coreutils 8.6 (2010-10-15) du no longer counts duplicate arguments.
Revert the relevant part of commit 618a3027ed (du: fix "du /dir /dir"
case).
function old new delta
du_main 302 297 -5
reset_ino_dev_hashtable 78 - -78
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-83) Total: -83 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/du.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/du.c b/coreutils/du.c index 6d737fbfb..d14d9e4ea 100644 --- a/coreutils/du.c +++ b/coreutils/du.c | |||
@@ -290,11 +290,11 @@ int du_main(int argc UNUSED_PARAM, char **argv) | |||
290 | total = 0; | 290 | total = 0; |
291 | do { | 291 | do { |
292 | total += du(*argv); | 292 | total += du(*argv); |
293 | /* otherwise du /dir /dir won't show /dir twice: */ | ||
294 | reset_ino_dev_hashtable(); | ||
295 | G.slink_depth = slink_depth_save; | 293 | G.slink_depth = slink_depth_save; |
296 | } while (*++argv); | 294 | } while (*++argv); |
297 | 295 | ||
296 | if (ENABLE_FEATURE_CLEAN_UP) | ||
297 | reset_ino_dev_hashtable(); | ||
298 | if (opt & OPT_c_total) | 298 | if (opt & OPT_c_total) |
299 | print(total, "total"); | 299 | print(total, "total"); |
300 | 300 | ||