summaryrefslogtreecommitdiff
path: root/bin/pax/pax.h
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-03-17 03:23:18 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-03-17 03:23:18 +0000
commit091f6b2cd2e14770746b4e99cc9058679c2403e1 (patch)
tree310d93118fbc3f8abac8dc17dd0c4c64802db540 /bin/pax/pax.h
parent232a2f05d9f71e64ae425a3947b98559ba6d177b (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.h6
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
*