[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dd skip bug?
From: |
Pádraig Brady |
Subject: |
dd skip bug? |
Date: |
Thu, 17 Apr 2008 01:01:23 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
dd handles skip weirdly
disk=/dev/sda8
dd if=$disk bs=8M count=1 skip=1000 of=/dev/null #ok
dd if=$disk bs=8M count=1 skip=1000K of=/dev/null #reads whole disk! as seek
fails
I had a 10s look at the source and noticed a comment
saying POSIX doesn't specify what we should do when
skipping past the end of input. For seekable files though,
reading the whole thing is unexpected to me at least.
I would expect it to do:
if (seekable && !seek(skip_len))
exit(EXIT_FAILURE);
Pádraig.
- dd skip bug?,
Pádraig Brady <=