Bug 3850 - /usr/bin/cmp fails with nonzero byte offsets
Summary: /usr/bin/cmp fails with nonzero byte offsets
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-06-12 03:50 UTC by metcalf
Modified: 1997-08-19 15:37 UTC (History)
0 users

See Also:


Attachments
file.diff (2.60 KB, patch)
1997-06-12 03:50 UTC, metcalf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description metcalf 1997-06-12 03:50:01 UTC
	/usr/bin/cmp fails to perform according to the manual page
	cmp.1 in that nonzero values of skip1 and skip2 for the
	byte offsets results in an 'Invalid argument' error.
	This seems to be due to the fact that the mmap system
	call fails for non page aligned offsets.  Also, only
	base r10 conversion is allowed whereas the manual page 
	implies that octal and hexadecimal byte offsets can be
	entered.

Fix: Apply the following patch to the sources in the 
	/usr/src/usr.bin/cmp directory:

How-To-Repeat: 	prompt% /usr/bin/cmp file1 file2 skip1 skip2

	where skip1 and skip2 are nonzero byte offsets
	into file1 and file2 respectively.
Comment 1 metcalf 1997-06-13 09:01:21 UTC
See bin/3855 for a follow up patch incorporating elements of 3.0-CURRENT
sources.
-----
Jeffrey M. Metcalf
metcalf@snet.net

http://ruddles.stat.uconn.edu/~jeff
Comment 2 jlemon freebsd_committer freebsd_triage 1997-08-19 15:34:09 UTC
State Changed
From-To: open->closed


Argument conversion problem fixed, offset problem already taken care of.