]> git.ipfire.org Git - thirdparty/coreutils.git/commit
dd: don't continue copying when ftruncate fails using seek= and of=
authorCollin Funk <collin.funk1@gmail.com>
Wed, 24 Dec 2025 05:45:37 +0000 (21:45 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Thu, 25 Dec 2025 23:16:57 +0000 (15:16 -0800)
commitb12593d1249b3369a177bc84c93f54239b965e4a
tree75c540323113e87830b6ed0ccf21a287755d6acb
parent7c1bc64d384678998f7a3e85301350ca5e258916
dd: don't continue copying when ftruncate fails using seek= and of=

* src/dd.c (main): Reduce the scope of exit_status. Exit immediately if
ftruncate fails.
* tests/dd/fail-ftruncate-fstat.sh: New test.
* tests/local.mk (all_tests): Add the new test.
* NEWS: Mention the bug fix.
NEWS
src/dd.c
tests/dd/fail-ftruncate-fstat.sh [new file with mode: 0755]
tests/local.mk