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
_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue

Reply via email to