]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Output a zero rdev except for bdevs, cdevs, fifos and sockets. This
authorDavid E. O'Brien <obrien@FreeBSD.org>
Sun, 30 Mar 1997 10:34:16 +0000 (10:34 +0000)
committerDavid E. O'Brien <obrien@FreeBSD.org>
Sun, 30 Mar 1997 10:34:16 +0000 (10:34 +0000)
commit895bfbc4e948c2365f0daf6830ce41b958b12f3e
tree0010f86df86e683765cc0d845ed9ccb5a7cbfce5
parent22565b1e7280b0874acb1f89944e260862a3d349
Output a zero rdev except for bdevs, cdevs, fifos and sockets.  This
stops regular files with unrepresentable rdevs from being rejected
and makes the output independent of unpreservable metadata.

Don't output a file if the major, minor or totality of its rdev would be
truncated.  Print a message about the skipped files to stderr but don't
report the error in the exit status.  cpio's abysmal error handling doesn't
allow continuing after an error, and the rdev checks had to be misplaced
to avoid the problem of returning an error code from routines that return
void.

Minor numbers are limited to 21 bits in pax's ustar format and to 18
bits in archives created by gnu tar (gnu tar wastes 3 bits for padding).
pax's and cpio's ustar format is incompatible with gnu tar's ustar
format for other reasons (see cpio/README).

Submitted by: bde via old gnu/usr.bin/cpio v2.3.
contrib/cpio/copyout.c