← Commit list

e563f9e85

Ron Yorston
Ron Yorston
2019-02-19
SUCCESS Duration: 150s

Subject

du: don't count duplicate arguments. Closes 5288

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/du.c+2 -2
@@ -290,11 +290,11 @@ int du_main(int argc UNUSED_PARAM, char **argv)
total = 0;
do {
total += du(*argv);
- /* otherwise du /dir /dir won't show /dir twice: */
- reset_ino_dev_hashtable();
G.slink_depth = slink_depth_save;
} while (*++argv);
+ if (ENABLE_FEATURE_CLEAN_UP)
+ reset_ino_dev_hashtable();
if (opt & OPT_c_total)
print(total, "total");
libbb/inode_hash.c+1 -1
@@ -77,7 +77,7 @@ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *
ino_dev_hashtable[i] = bucket;
}
-#if ENABLE_DU || ENABLE_FEATURE_CLEAN_UP
+#if ENABLE_FEATURE_CLEAN_UP
/* Clear statbuf hash table */
void FAST_FUNC reset_ino_dev_hashtable(void)
{