Make cmp -s work properly if skip values are given. Also, exit(1)
is now exit(DIFF_EXIT). PR: 18597 Submitted by: Anatoly Vorobey <mellon@pobox.com> Committed at: Usenix terminal room
This commit is contained in:
parent
a8cef3390b
commit
84ad3d8fc4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61883
@ -65,9 +65,6 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
|
||||
off_t pagemask, off1, off2;
|
||||
size_t pagesize;
|
||||
|
||||
if (sflag && len1 != len2)
|
||||
exit(1);
|
||||
|
||||
if (skip1 > len1)
|
||||
eofmsg(file1);
|
||||
len1 -= skip1;
|
||||
@ -75,6 +72,9 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2)
|
||||
eofmsg(file2);
|
||||
len2 -= skip2;
|
||||
|
||||
if (sflag && len1 != len2)
|
||||
exit(DIFF_EXIT);
|
||||
|
||||
pagesize = getpagesize();
|
||||
pagemask = (off_t)pagesize - 1;
|
||||
off1 = ROUNDPAGE(skip1);
|
||||
|
Loading…
Reference in New Issue
Block a user