History log of /openbsd-src/usr.bin/cmp/cmp.c (Results 1 – 19 of 19)
Revision Date Author Comments
# b7041c07 24-Oct-2021 deraadt <deraadt@openbsd.org>

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which mig

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef.
ok millert

show more ...


# 0e0db0d6 05-Mar-2018 cheloha <cheloha@openbsd.org>

Stricter checking for skip1 and skip2.

As we do elsewhere in the tree, make sure we (a) got a number at all,
(b) that it doesn't have non-digits dangling off the end, (c) that it's
positive, and (d)

Stricter checking for skip1 and skip2.

As we do elsewhere in the tree, make sure we (a) got a number at all,
(b) that it doesn't have non-digits dangling off the end, (c) that it's
positive, and (d) that it didn't overflow.

ok tb@

show more ...


# 219f9c84 05-Mar-2018 cheloha <cheloha@openbsd.org>

Add fatal() and fatalx() and put them to use.

... but don't use them for pledge errors or usage errors.

They are convenience wrappers that check if sflag is set before
logging an error. They alway

Add fatal() and fatalx() and put them to use.

... but don't use them for pledge errors or usage errors.

They are convenience wrappers that check if sflag is set before
logging an error. They always exit with status 2.

We were not honoring sflag in special.c at all. Now we do.

ok tb@

show more ...


# 84d7e2a2 28-Oct-2016 schwarze <schwarze@openbsd.org>

Delete some useless setlocale(3) calls in /usr/bin, no functional change.
Patches from Jan Stary <hans at stare dot cz>, tweaked by me and tb@.
While here, apply some simple style improvements:
Sort

Delete some useless setlocale(3) calls in /usr/bin, no functional change.
Patches from Jan Stary <hans at stare dot cz>, tweaked by me and tb@.
While here, apply some simple style improvements:
Sort headers, static void __dead usage(), return from main(),
zap case '?', drop /* NOTREACHED */, drop break after usage(), ...
OK tb@ millert@

show more ...


# f5cc6d1c 14-Aug-2016 guenther <guenther@openbsd.org>

Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.
Fix a type mismatch in ftp's "page" command and could make transfers restart
at the wrong position.

ok and a ull->ll tweak fr

Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.
Fix a type mismatch in ftp's "page" command and could make transfers restart
at the wrong position.

ok and a ull->ll tweak from natano@, ok tedu@

show more ...


# b4e5b6a2 29-Dec-2015 gsoares <gsoares@openbsd.org>

fix exit status on pledge(2) failure.

OK tb@ jsg@


# a2428f0b 10-Oct-2015 doug <doug@openbsd.org>

Add pledge support to cmp(1).

This is a simple case of using "stdio rpath" until all files are opened and
then dropping down to "stdio" since it includes "rw" on open fds.

ok deraadt@


# 043fbe51 27-Oct-2009 deraadt <deraadt@openbsd.org>

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(th

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

show more ...


# 1837a5ca 10-Jun-2003 deraadt <deraadt@openbsd.org>

mostly ansi cleanup; pval ok


# f75387cb 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# c72b5b24 16-Feb-2002 millert <millert@openbsd.org>

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be don

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.

show more ...


# 89502c71 03-Aug-1999 mickey <mickey@openbsd.org>

use particular mapping type instead of bogus zero.
-Wall overall happiness; millert@ ok


# 2675c2c1 21-Jan-1998 deraadt <deraadt@openbsd.org>

error


# 5c06bcd3 12-Jun-1997 deraadt <deraadt@openbsd.org>

allow hex/octal offsets; metcalf@snet.net


# 72799b18 15-Jan-1997 millert <millert@openbsd.org>

getopt(3) returns -1 when out of args, not EOF, whee!


# b27e5572 01-Aug-1996 michaels <michaels@openbsd.org>

whoops, goofed on the last one, this should be correct.


# ff8a497c 01-Aug-1996 michaels <michaels@openbsd.org>

Modified cmp to, when given arg -s, really be silent. (reported by
marc@mit.edu, netbsd pr #2642.) Changed main() to use return()
rather than exit().

(just tried checking it in, but local cvs got k

Modified cmp to, when given arg -s, really be silent. (reported by
marc@mit.edu, netbsd pr #2642.) Changed main() to use return()
rather than exit().

(just tried checking it in, but local cvs got killed while writting
log message)

show more ...


# 1258a77d 26-Jun-1996 deraadt <deraadt@openbsd.org>

rcsid


# df930be7 18-Oct-1995 deraadt <deraadt@openbsd.org>

initial import of NetBSD tree