]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
f_detect_junk: avoid dd option oflag=append
authorMatthias Andree <matthias.andree@gmx.de>
Thu, 26 Jun 2025 20:28:41 +0000 (22:28 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 1 Jul 2025 14:32:24 +0000 (10:32 -0400)
because it is unavailable on, for instance, FreeBSD's dd.
Instead use dd to just generate 16 MB of zeroes and use
the shell append redirection.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Link: https://lore.kernel.org/r/20250626202919.321842-2-matthias.andree@gmx.de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_detect_junk/script

index 2577842f58fe7426ca36687541874e4d75686cd4..a49cb295d064591c06e8be7c58871c99534eb7ef 100644 (file)
@@ -9,7 +9,7 @@ FSCK_OPT=-fn
 IMAGE=$test_dir/image.bz2
 
 bzip2 -d < $IMAGE > $TMPFILE
-$DD if=/dev/zero of=$TMPFILE conv=notrunc oflag=append bs=1024k count=16 > /dev/null 2>&1
+$DD if=/dev/zero conv=notrunc bs=1024k count=16 2>/dev/null >>$TMPFILE
 
 # Run fsck to fix things?
 if [ -x $DEBUGFS_EXE ]; then