Let count=-something fail, while count=0 may succeed, thus making dd(1)

useful as a seeking-tool as well as its many other uses.  Previously,
dd(1) would succeed with count=0, but wouldn't get to the point that
blocks were to be read/written. This is a more useful behavior, and
this specific case doesn't seem to be handled by POSIX.
This commit is contained in:
Brian Feldman 1999-09-16 05:12:59 +00:00
parent f9083fdb2a
commit 1838cf5671
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51326

View File

@ -207,8 +207,8 @@ f_count(arg)
{
cpy_cnt = get_num(arg);
if (!cpy_cnt)
terminate(0);
if (cpy_cnt < 0)
errx(1, "count cannot be negative");
}
static void