Handle cpio commands properly

This commit is contained in:
topjohnwu
2023-07-03 21:57:28 -07:00
parent 43b9a09c9b
commit 5ee6daf126
5 changed files with 51 additions and 27 deletions

View File

@ -177,9 +177,8 @@ int main(int argc, char *argv[]) {
compress(action[8] == '=' ? &action[9] : "gzip", argv[2], argv[3]);
} else if (argc > 4 && action == "hexpatch") {
return hexpatch(byte_view(argv[2]), byte_view(argv[3]), byte_view(argv[4])) ? 0 : 1;
} else if (argc > 2 && action == "cpio"sv) {
if (!rust::cpio_commands(argc - 2, argv + 2))
usage(argv[0]);
} else if (argc > 2 && action == "cpio") {
return rust::cpio_commands(argc - 2, argv + 2) ? 0 : 1;
} else if (argc > 3 && action == "dtb") {
if (dtb_commands(argc - 2, argv + 2))
usage(argv[0]);