[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-ddrescue] Appending zeroes by seek is not working
From: |
Pavel Roskin |
Subject: |
[Bug-ddrescue] Appending zeroes by seek is not working |
Date: |
Sat, 13 Dec 2014 00:28:28 -0500 |
Hello!
I tried adding zeroes to the end of a file using ddrescue, but it failed.
With stock ddrescue 1.17 from Fedora 20:
/usr/bin/ddrescue -o 2048 -s 0 /dev/null foo
ddrescue: Nothing to do.
With locally compiled ddrescue 1.19:
/usr/local/bin/ddrescue -o 2048 -s 0 /dev/null foo
ddrescue: Empty domain.
In either case, the file foo is not extended.
"Empty domain" sounds more cryptic than "Nothing to do". I think it's a
regression.
Yes, I know that I can copy 1 byte from /dev/zero and subtract 1 from the
output position, but I don't want any workarounds. I know that I can use
dd. But I want to use ddrescue, as I know its options and it's doing the
right thing most of the time.
I think copying 0 bytes is just fine if the output position is specified.
Here's a related but different issue.
rm foo
ddrescue -o 2048 -s 1 /dev/null foo
ls -l foo
The resulting file "foo" is 0 bytes long. Apparently, the seek is never
performed because /dev/null is empty. I believe the seek should be
performed if it's explicitly requested on the command line.
--
Regards,
Pavel Roskin