| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
Idea taken from obrien.
Reviewed by: obrien
|
|
|
|
| |
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
|
|
|
|
|
|
|
|
|
|
| |
statement if blocks[*] when the else could be ambiguous, not defaulting
to int type and removal of some unused variables.
[*] This is explicitly allowed by style(9) when the single statement
spans more than one line.
Reviewed by: obrien, chuckr
|
|
|
|
|
|
|
|
| |
for regular files. This fixes recent breakage of cp'ing from /dev/zero.
/dev/zero doesn't support mmap(), but the device driver mmap routines are
not called for mapping 0 bytes, so the error was not detected. mmap()
can't even be used for cp'ing special files that support mmap(), since
there is general way to determine the file size.
|
|
|
|
|
|
| |
This should calm down attempts to `cp -p' to a nfs mount or some other
filesystem that doesn't accept flags or all combinations of flags.
It will warn if it fails to change flags though.
|
|
|
|
|
| |
NUL at the end of the path.
Inspired by: OpenBSD's changes in this area by theo de raadt
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
printed a bogus warning with a stale errno if write() returns a short
count. Now we continue copying. We still print a bogus warning if
write() returns an "impossible" short count of 0.
|
|
|
|
|
| |
print which input cp(1) expect (y/n) and print a warning if the
file was not overwritten.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use MAP_FAILED instead of the constant -1 to indicate
failure (required by POSIX).
- Removed flag arguments of '0' (required by POSIX).
- Fixed code which expected an error return of 0.
- Fixed code which thought any address with the high bit set
was an error.
- Check for failure where no checks were present.
Discussed with: bde
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
| |
|
|
|
|
|
|
|
|
|
| |
option -f and -i are exclusive
respond `Y' is equal to `y'
fix usage string
remove isatty(3) check
Reviewed by: pst
|
| |
|
|
|
|
| |
Submitted by: pst, ache
|
|
|
|
|
|
|
| |
option -f and -i are exclusive
all flag variables initialized with zero
respond `Y' is equal to `y'
update usage string
|
|
|
|
| |
This also fixes loss of the sticky bit for `mv' across file systems.
|
|
|
|
|
|
|
|
|
|
| |
documented and is incompatible with gnu cp. It has very few good effects
(it recovers some disk space) and many bad ones:
- special files are unlinked after certain errors.
- the data may not be recoverable if the source is a special file or fifo.
- unlinking destroys the target attributes as well as the target data.
- unlinking doesn't actually remove the target data if the target is multiply
linked.
|
|
|
|
| |
Reviewed by: phk
|
| |
|
|
|