deraadt
74b2c8400a
snprintf/vsnprintf return < 0 on error, rather than -1.
5 years ago
deraadt
e5e55cd690
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
5 years ago
guenther
487debcae6
Use a constant format string and output the variable part with %s
ok krw@ millert@
7 years ago
guenther
98ac59d5a1
Use O_CLOEXEC when opening fds local to a function
ok jca@ krw@
7 years ago
deraadt
399fdad76b
creat() -> open equiv; from Frederic Nowak
8 years ago
deraadt
46f44e2831
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
14 years ago
deraadt
db4a02f55c
casts that cannot cause breakage in the future
18 years ago
deraadt
01172b9781
spaces, and a off_t typecast to please lint
18 years ago
cloder
d27b833e7e
Make sure we check snprintf return value for failure or truncation before
using it. Make uu_lock_txfr work by properly checking return value from
put_pid(). Fix an FD leak on the lockfile in an error path (from FreeBSD
with modifications). OK millert@, input from otto@ and Bruno Rohee.
19 years ago
deraadt
2462bc4b83
knf; otto ok
20 years ago
millert
679cd5d050
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.
21 years ago
fgsch
fb18813faf
some -Wall and spaces cleanup, scsi.c left.
some brave soul should look at it.
22 years ago
deraadt
1861c91a56
pid_t cleanup
22 years ago
millert
b68c09e067
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.
22 years ago
csapuntz
15f3825602
Add opendisk from NetBSD.
25 years ago
millert
f110e3be6d
More <sys/file.h> vs. <fcntl.h> and open() flags fixes.
25 years ago
brian
d4e74d83fc
Get the pid right if a stale lock file exists.
Submitted by: Lawrence D. Lopez <lopez@cisco.com>
25 years ago
brian
c965a1f473
Cast pid_t to int for sprintf.
Pointed out by: Charlie Sorsby <crs@hgo.net>
26 years ago
brian
6c131f03f8
Add uu_lock_txfr() for donating locks to another process.
Reviewed by: Theo
26 years ago
bri
84b9176eb4
Correct the ftruncate() call.
27 years ago
bri
55694d3e32
Introduce uu_lock(), uu_unlock() and uu_lockerr()
into libutil.
Obtained from: FreeBSD
Reviewed by: Theo
27 years ago