diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-03-17 03:23:18 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-03-17 03:23:18 +0000 |
commit | 091f6b2cd2e14770746b4e99cc9058679c2403e1 (patch) | |
tree | 310d93118fbc3f8abac8dc17dd0c4c64802db540 /bin/pax/pax.h | |
parent | 232a2f05d9f71e64ae425a3947b98559ba6d177b (diff) |
Add PAX_IS_{REG,HARDLINK,LINK} macros to simply many file type tests
ok millert@
Diffstat (limited to 'bin/pax/pax.h')
-rw-r--r-- | bin/pax/pax.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/pax/pax.h b/bin/pax/pax.h index edca827dd30..f06ad38be69 100644 --- a/bin/pax/pax.h +++ b/bin/pax/pax.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.h,v 1.25 2015/03/09 04:23:29 guenther Exp $ */ +/* $OpenBSD: pax.h,v 1.26 2015/03/17 03:23:17 guenther Exp $ */ /* $NetBSD: pax.h,v 1.3 1995/03/21 09:07:41 cgd Exp $ */ /*- @@ -127,6 +127,10 @@ typedef struct { #define PAX_GLF 12 /* GNU long file */ } ARCHD; +#define PAX_IS_REG(type) ((type) == PAX_REG || (type) == PAX_CTG) +#define PAX_IS_HARDLINK(type) ((type) == PAX_HLK || (type) == PAX_HRG) +#define PAX_IS_LINK(type) ((type) == PAX_SLK || PAX_IS_HARDLINK(type)) + /* * Format Specific Routine Table * |