summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-07-14 14:00:30 +0000
committermidipix <writeonce@midipix.org>2024-07-14 20:18:46 +0000
commit7c125b3a37d91a20813402a7463b05bfb38a027f (patch)
treeb65b0d625c4c448241bdf5d257ff4c245dd0e480
parentffaddbf312359c2f0a2c236f66703787204e3613 (diff)
downloadtpax-7c125b3a37d91a20813402a7463b05bfb38a027f.tar.bz2
tpax-7c125b3a37d91a20813402a7463b05bfb38a027f.tar.xz
library api: tpax_specs.h: added cpio format definitions.
-rw-r--r--include/tpax/tpax_specs.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/tpax/tpax_specs.h b/include/tpax/tpax_specs.h
index e30b36b..2ae13a9 100644
--- a/include/tpax/tpax_specs.h
+++ b/include/tpax/tpax_specs.h
@@ -28,6 +28,33 @@ extern "C" {
| S_IRGRP | S_IWGRP | S_IXGRP \
| S_IROTH | S_IWOTH | S_IXOTH )
+#define TPAX_CPIO_MAGIC {'0','7','0','7','0','7',0}
+#define TPAX_CPIO_TRAILER {'T','R','A','I','L','E','R','!','!','!',0}
+
+#define TPAX_CPIO_FILEMODE_IRUSR 0000400
+#define TPAX_CPIO_FILEMODE_IWUSR 0000200
+#define TPAX_CPIO_FILEMODE_IXUSR 0000100
+#define TPAX_CPIO_FILEMODE_IRGRP 0000040
+#define TPAX_CPIO_FILEMODE_IWGRP 0000020
+#define TPAX_CPIO_FILEMODE_IXGRP 0000010
+#define TPAX_CPIO_FILEMODE_IROTH 0000004
+#define TPAX_CPIO_FILEMODE_IWOTH 0000002
+#define TPAX_CPIO_FILEMODE_IXOTH 0000001
+
+#define TPAX_CPIO_FILEMODE_ISUID 0004000
+#define TPAX_CPIO_FILEMODE_ISGID 0002000
+#define TPAX_CPIO_FILEMODE_ISVTX 0001000
+
+#define TPAX_CPIO_FILEMODE_ISFIFO 0010000
+#define TPAX_CPIO_FILEMODE_ISCHR 0020000
+#define TPAX_CPIO_FILEMODE_ISDIR 0040000
+#define TPAX_CPIO_FILEMODE_ISBLK 0060000
+#define TPAX_CPIO_FILEMODE_ISREG 0100000
+
+#define TPAX_CPIO_FILEMODE_ISCTG 0110000
+#define TPAX_CPIO_FILEMODE_ISLNK 0120000
+#define TPAX_CPIO_FILEMODE_ISSOCK 0140000
+
struct tpax_ustar_header {
char u_name [100];
char u_mode [8];