From ce7e553ae90cf03b65ac1849b1030912db03f7e9 Mon Sep 17 00:00:00 2001 From: bitstr0m Date: Tue, 17 Dec 2024 10:38:43 +0000 Subject: [PATCH] Implement `cpio.h` --- include/cpio.h | 29 +++++++++++++++++++++++++++++ src/header/mod.rs | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 include/cpio.h diff --git a/include/cpio.h b/include/cpio.h new file mode 100644 index 0000000000..e2012810e9 --- /dev/null +++ b/include/cpio.h @@ -0,0 +1,29 @@ +#ifndef _RELIBC_CPIO_H +#define _RELIBC_CPIO_H + +#define MAGIC "070707" + +#define C_IRUSR 00000400 +#define C_IWUSR 00000200 +#define C_IXUSR 00000100 +#define C_IRGRP 00000040 +#define C_IWGRP 00000020 +#define C_IXGRP 00000010 +#define C_IROTH 00000004 +#define C_IWOTH 00000002 +#define C_IXOTH 00000001 + +#define C_ISUID 00004000 +#define C_ISGID 00002000 +#define C_ISVTX 00001000 + +#define C_ISDIR 00040000 +#define C_ISFIFO 00010000 +#define C_ISREG 00100000 +#define C_ISBLK 00060000 +#define C_ISCHR 00020000 +#define C_ISCTG 00110000 +#define C_ISLNK 00120000 +#define C_ISSOCK 00140000 + +#endif /* _RELIBC_CPIO_H */ diff --git a/src/header/mod.rs b/src/header/mod.rs index a5f9db6498..6365e1769a 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -7,7 +7,7 @@ pub mod assert; pub mod bits_pthread; pub mod bits_sched; // complex.h implemented in C -// TODO: cpio.h +// cpio.h implemented in C pub mod crypt; pub mod ctype; // TODO: curses.h (deprecated)