From 091f6b2cd2e14770746b4e99cc9058679c2403e1 Mon Sep 17 00:00:00 2001 From: Philip Guenther Date: Tue, 17 Mar 2015 03:23:18 +0000 Subject: Add PAX_IS_{REG,HARDLINK,LINK} macros to simply many file type tests ok millert@ --- bin/pax/pax.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/pax/pax.h') 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 * -- cgit v1.2.3