summaryrefslogtreecommitdiffstats
path: root/src/tests/cpio_test.c
Commit message (Collapse)AuthorAgeFilesLines
* [uaccess] Remove redundant copy_from_user() and copy_to_user()Michael Brown2025-04-301-0/+1
| | | | | | | Remove the now-redundant copy_from_user() and copy_to_user() wrapper functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cpio] Allow for the construction of pure directoriesMichael Brown2025-03-121-0/+16
| | | | | | | | | | Allow for the possibility of creating empty directories (without having to include a dummy file inside the directory) using a zero-length image and a CPIO filename with a trailing slash, such as: initrd emptyfile /usr/share/oem/ Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cpio] Fix calculation of name lengths in CPIO headersMichael Brown2025-03-121-0/+263
Commit 12ea8c4 ("[cpio] Allow for construction of parent directories as needed") introduced a regression in constructing CPIO archive headers for relative paths (e.g. simple filenames with no leading slash). Fix by counting the number of path components rather than the number of path separators, and add some test cases to cover CPIO header construction. Signed-off-by: Michael Brown <mcb30@ipxe.org>