diff options
author | bde <bde@FreeBSD.org> | 1995-06-26 06:24:48 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-06-26 06:24:48 +0000 |
commit | f0ca90235ffbc38533e8d664d8c006ab3432d41a (patch) | |
tree | 40316348fc3ad4b1c9c40d02e1e3d943f37eb6ac /bin | |
parent | 1aca6d86947608971056aac349a058ddb79b5ca6 (diff) | |
download | FreeBSD-src-f0ca90235ffbc38533e8d664d8c006ab3432d41a.zip FreeBSD-src-f0ca90235ffbc38533e8d664d8c006ab3432d41a.tar.gz |
Improve the handling of large minor numbers:
cpio/copyout.c:
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.
pax/pax.h:
Use the system macros for major(), minor() and makedev().
pax already checks _all_ output conversions for overflow. This has the
undesirable effect that failure to convert relatively useless fields
such as st_dev for regular files causes files not to be output. pax
doesn't report exactly which fields couldn't be converted.
tar/create.c:
Don't output a file if the major or minor its rdev would be truncated.
Print a message about the skipped files to stderr and report the error
in the exit status.
tar/tar.c:
For not immediately fatal errors, exit with status 1, not the error count
(mod 256).
All:
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).
Diffstat (limited to 'bin')
-rw-r--r-- | bin/pax/pax.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/pax/pax.h b/bin/pax/pax.h index 450cd6b..d6fe02c 100644 --- a/bin/pax/pax.h +++ b/bin/pax/pax.h @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * @(#)pax.h 8.2 (Berkeley) 4/18/94 - * $Id: pax.h,v 1.2 1994/09/24 02:56:28 davidg Exp $ + * $Id: pax.h,v 1.3 1995/05/30 00:07:01 rgrimes Exp $ */ /* @@ -227,9 +227,9 @@ typedef struct oplist { #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) #endif -#define MAJOR(x) (((unsigned)(x) >> 8) & 0xff) -#define MINOR(x) ((x) & 0xff) -#define TODEV(x, y) (((unsigned)(x) << 8) | ((unsigned)(y))) +#define MAJOR(x) major(x) +#define MINOR(x) minor(x) +#define TODEV(x, y) makedev((x), (y)) /* * General Defines |