-/* $OpenBSD: extern.h,v 1.63 2024/04/16 18:52:43 jca Exp $ */
+/* $OpenBSD: extern.h,v 1.64 2024/04/17 18:12:12 jca Exp $ */
/* $NetBSD: extern.h,v 1.5 1996/03/26 23:54:16 mrg Exp $ */
/*-
int ustar_rd(ARCHD *, char *);
int ustar_wr(ARCHD *);
int pax_id(char *, int);
+int pax_opt(void);
int pax_wr(ARCHD *);
/*
-/* $OpenBSD: options.c,v 1.113 2024/04/17 10:19:17 jca Exp $ */
+/* $OpenBSD: options.c,v 1.114 2024/04/17 18:12:12 jca Exp $ */
/* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */
/*-
/* 10: POSIX PAX */
{"pax", 5120, BLKMULT, 0, 1, BLKMULT, 0, pax_id, no_op,
ustar_rd, tar_endrd, no_op, pax_wr, tar_endwr, tar_trail,
- tar_opt},
+ pax_opt},
#endif
};
#define F_OCPIO 0 /* format when called as cpio -6 */
-/* $OpenBSD: tar.c,v 1.84 2024/04/16 22:58:10 jca Exp $ */
+/* $OpenBSD: tar.c,v 1.85 2024/04/17 18:12:12 jca Exp $ */
/* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */
/*-
}
#endif
+/*
+ * pax_opt()
+ * handle pax format specific -o options
+ * Return:
+ * 0 if ok -1 otherwise
+ */
+#ifndef SMALL
+int
+pax_opt(void)
+{
+ OPLIST *opt;
+
+ while ((opt = opt_next()) != NULL) {
+ if (1) {
+ paxwarn(1, "Unknown pax format -o option/value pair %s=%s",
+ opt->name, opt->value);
+ return(-1);
+ }
+ }
+ return 0;
+}
+#endif
+
/*
* name_split()
* see if the name has to be split for storage in a ustar header. We try