修复mac上cpio打包问题

This commit is contained in:
zhangzheng
2023-12-15 23:15:33 +08:00
parent bce83c3682
commit 6f3827a866
5 changed files with 19 additions and 15 deletions

View File

@@ -66,11 +66,10 @@ int cpio_find_next(umword_t st, const char *pre_name,
int name_size = htoi(file_info->c_namesize, 8);
mode = htoi(file_info->c_mode, 8);
const char *f_name = (char *)(i + sizeof(cpio_fs_t));
if (strcmp("TRAILER!!", f_name) == 0)
if (strcmp("TRAILER!!!", f_name) == 0)
{
return -1;
}
if (strncmp(f_name, pre_name, strlen(pre_name)) == 0)
{
if (S_ISDIR(mode))
@@ -117,7 +116,6 @@ int cpio_find_file(umword_t st, umword_t en, const char *name, umword_t *size, i
int name_size = htoi(file_info->c_namesize, 8);
mode = htoi(file_info->c_mode, 8);
const char *f_name = (char *)(i + sizeof(cpio_fs_t));
// printf("%s\n", f_name);
if (name[0] == '\0')
{
if (type)