[libc-commits] [libc] [libc][cpio] Add cpio.h header. (PR #123798)
via libc-commits
libc-commits at lists.llvm.org
Fri Jan 24 09:57:30 PST 2025
https://github.com/siya100 updated https://github.com/llvm/llvm-project/pull/123798
>From ed3453cc5780923a705baaa19a759c370f84343b Mon Sep 17 00:00:00 2001
From: siya <siya at Siya.com>
Date: Tue, 21 Jan 2025 18:08:56 +0000
Subject: [PATCH 1/4] Document POSIX header cpio.h
---
libc/docs/headers/index.rst | 1 +
libc/utils/docgen/cpio.yaml | 31 +++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 libc/utils/docgen/cpio.yaml
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 858b2142defa92..e457df558b1398 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -8,6 +8,7 @@ Implementation Status
arpa/inet
assert
complex
+ cpio
ctype
errno
fenv
diff --git a/libc/utils/docgen/cpio.yaml b/libc/utils/docgen/cpio.yaml
new file mode 100644
index 00000000000000..d2371c9efb9d3f
--- /dev/null
+++ b/libc/utils/docgen/cpio.yaml
@@ -0,0 +1,31 @@
+functions:
+ cpio_open:
+ in-latest-posix: ''
+ cpio_create:
+ in-latest-posix: ''
+ cpio_read:
+ in-latest-posix: ''
+ cpio_write:
+ in-latest-posix: ''
+ cpio_close:
+ in-latest-posix: ''
+macros:
+ CPIO_ACCESS:
+ in-latest-posix: ''
+ CPIO_CREATE:
+ in-latest-posix: ''
+ CPIO_EXTRACT:
+ in-latest-posix: ''
+ CPIO_LINK:
+ in-latest-posix: ''
+ CPIO_RENAME:
+ in-latest-posix: ''
+ CPIO_SYMLINK:
+ in-latest-posix: ''
+ CPIO_DELETE:
+ in-latest-posix: ''
+ CPIO_TRUNCATE:
+ in-latest-posix: ''
+ CPIO_UNLINK:
+ in-latest-posix: ''
+
>From b207e4346e04a7cb311c2254d750cd51d788c1c7 Mon Sep 17 00:00:00 2001
From: siya <siya at Siya.com>
Date: Tue, 21 Jan 2025 18:09:35 +0000
Subject: [PATCH 2/4] Document POSIX header cpio.h
---
libc/docs/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index f88d7c27f9f6b3..b2ead3ffc5e657 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -37,6 +37,7 @@ if (SPHINX_FOUND)
aio
arpa/inet
assert
+ cpio
ctype
errno
fenv
>From 9e75b3e4cf3ac4a402bee5f58ae1e9df2755b093 Mon Sep 17 00:00:00 2001
From: siya <siya at Siya.com>
Date: Fri, 24 Jan 2025 12:53:03 +0000
Subject: [PATCH 3/4] Document POSIX header cpio.h
---
libc/utils/docgen/cpio.yaml | 108 ++++++++++++++++++++++++++++++------
1 file changed, 92 insertions(+), 16 deletions(-)
diff --git a/libc/utils/docgen/cpio.yaml b/libc/utils/docgen/cpio.yaml
index d2371c9efb9d3f..d2531b106f0af2 100644
--- a/libc/utils/docgen/cpio.yaml
+++ b/libc/utils/docgen/cpio.yaml
@@ -1,31 +1,107 @@
-functions:
- cpio_open:
+macros:
+ C_IRUSR:
+ c-definition: "Read by owner."
+ in-latest-posix: ''
+ value: "0000400"
+
+ C_IWUSR:
+ c-definition: "Write by owner."
in-latest-posix: ''
- cpio_create:
+ value: "0000200"
+
+ C_IXUSR:
+ c-definition: "Execute by owner."
in-latest-posix: ''
- cpio_read:
+ value: "0000100"
+
+ C_IRGRP:
+ c-definition: "Read by group."
in-latest-posix: ''
- cpio_write:
+ value: "0000040"
+
+ C_IWGRP:
+ c-definition: "Write by group."
in-latest-posix: ''
- cpio_close:
+ value: "0000020"
+
+ C_IXGRP:
+ c-definition: "Execute by group."
in-latest-posix: ''
-macros:
- CPIO_ACCESS:
+ value: "0000010"
+
+ C_IROTH:
+ c-definition: "Read by others."
+ in-latest-posix: ''
+ value: "0000004"
+
+ C_IWOTH:
+ c-definition: "Write by others."
+ in-latest-posix: ''
+ value: "0000002"
+
+ C_IXOTH:
+ c-definition: "Execute by others."
+ in-latest-posix: ''
+ value: "0000001"
+
+ C_ISUID:
+ c-definition: "Set user ID."
in-latest-posix: ''
- CPIO_CREATE:
+ value: "0004000"
+
+ C_ISGID:
+ c-definition: "Set group ID."
in-latest-posix: ''
- CPIO_EXTRACT:
+ value: "0002000"
+
+ C_ISVTX:
+ c-definition: "Restricted deletion flag on directories."
in-latest-posix: ''
- CPIO_LINK:
+ value: "0001000"
+
+ C_ISDIR:
+ c-definition: "Directory."
in-latest-posix: ''
- CPIO_RENAME:
+ value: "0040000"
+
+ C_ISFIFO:
+ c-definition: "FIFO."
in-latest-posix: ''
- CPIO_SYMLINK:
+ value: "0010000"
+
+ C_ISREG:
+ c-definition: "Regular file."
in-latest-posix: ''
- CPIO_DELETE:
+ value: "0100000"
+
+ C_ISBLK:
+ c-definition: "Block special."
in-latest-posix: ''
- CPIO_TRUNCATE:
+ value: "0060000"
+
+ C_ISCHR:
+ c-definition: "Character special."
in-latest-posix: ''
- CPIO_UNLINK:
+ value: "0020000"
+
+ C_ISCTG:
+ c-definition: "Reserved."
in-latest-posix: ''
+ value: "0110000"
+
+ C_ISLNK:
+ c-definition: "Symbolic link."
+ in-latest-posix: ''
+ value: "0120000"
+
+ C_ISSOCK:
+ c-definition: "Socket."
+ in-latest-posix: ''
+ value: "0140000"
+
+ MAGIC:
+ c-definition: "The magic string for cpio files."
+ in-latest-posix: ''
+ value: '"070707"'
+
>From 2c5b6aa5c85e04dc617fe6843e4be06b64a6bf3d Mon Sep 17 00:00:00 2001
From: siya100 <85541510+siya100 at users.noreply.github.com>
Date: Fri, 24 Jan 2025 23:27:20 +0530
Subject: [PATCH 4/4] Update cpio.yaml
---
libc/utils/docgen/cpio.yaml | 63 -------------------------------------
1 file changed, 63 deletions(-)
diff --git a/libc/utils/docgen/cpio.yaml b/libc/utils/docgen/cpio.yaml
index d2531b106f0af2..b31c03778fba51 100644
--- a/libc/utils/docgen/cpio.yaml
+++ b/libc/utils/docgen/cpio.yaml
@@ -1,107 +1,44 @@
macros:
C_IRUSR:
- c-definition: "Read by owner."
in-latest-posix: ''
- value: "0000400"
-
C_IWUSR:
- c-definition: "Write by owner."
in-latest-posix: ''
- value: "0000200"
-
C_IXUSR:
- c-definition: "Execute by owner."
in-latest-posix: ''
- value: "0000100"
-
C_IRGRP:
- c-definition: "Read by group."
in-latest-posix: ''
- value: "0000040"
-
C_IWGRP:
- c-definition: "Write by group."
in-latest-posix: ''
- value: "0000020"
-
C_IXGRP:
- c-definition: "Execute by group."
in-latest-posix: ''
- value: "0000010"
-
C_IROTH:
- c-definition: "Read by others."
in-latest-posix: ''
- value: "0000004"
-
C_IWOTH:
- c-definition: "Write by others."
in-latest-posix: ''
- value: "0000002"
-
C_IXOTH:
- c-definition: "Execute by others."
in-latest-posix: ''
- value: "0000001"
-
C_ISUID:
- c-definition: "Set user ID."
in-latest-posix: ''
- value: "0004000"
-
C_ISGID:
- c-definition: "Set group ID."
in-latest-posix: ''
- value: "0002000"
-
C_ISVTX:
- c-definition: "Restricted deletion flag on directories."
in-latest-posix: ''
- value: "0001000"
-
C_ISDIR:
- c-definition: "Directory."
in-latest-posix: ''
- value: "0040000"
-
C_ISFIFO:
- c-definition: "FIFO."
in-latest-posix: ''
- value: "0010000"
-
C_ISREG:
- c-definition: "Regular file."
in-latest-posix: ''
- value: "0100000"
-
C_ISBLK:
- c-definition: "Block special."
in-latest-posix: ''
- value: "0060000"
-
C_ISCHR:
- c-definition: "Character special."
in-latest-posix: ''
- value: "0020000"
-
C_ISCTG:
- c-definition: "Reserved."
in-latest-posix: ''
- value: "0110000"
-
C_ISLNK:
- c-definition: "Symbolic link."
in-latest-posix: ''
- value: "0120000"
-
C_ISSOCK:
- c-definition: "Socket."
in-latest-posix: ''
- value: "0140000"
-
MAGIC:
- c-definition: "The magic string for cpio files."
in-latest-posix: ''
- value: '"070707"'
-
More information about the libc-commits
mailing list