|
|
@ -40,7 +40,6 @@ int main(int argc, char **argv) |
|
|
|
{ |
|
|
|
{ |
|
|
|
FILE *f; |
|
|
|
FILE *f; |
|
|
|
size_t s; |
|
|
|
size_t s; |
|
|
|
long pos = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (argc != 2) { |
|
|
|
if (argc != 2) { |
|
|
|
fprintf(stderr, "Usage: %s <file>\n", argv[0]); |
|
|
|
fprintf(stderr, "Usage: %s <file>\n", argv[0]); |
|
|
@ -65,6 +64,7 @@ int main(int argc, char **argv) |
|
|
|
/* check, if this is a cpio archive */ |
|
|
|
/* check, if this is a cpio archive */ |
|
|
|
if ((buf[0] == 0x71 && buf[1] == 0xc7) |
|
|
|
if ((buf[0] == 0x71 && buf[1] == 0xc7) |
|
|
|
|| (buf[0] == '0' && buf[1] == '7' && buf[2] == '0' && buf[3] == '7' && buf[4] == '0' && buf[5] == '1')) { |
|
|
|
|| (buf[0] == '0' && buf[1] == '7' && buf[2] == '0' && buf[3] == '7' && buf[4] == '0' && buf[5] == '1')) { |
|
|
|
|
|
|
|
long pos = 0; |
|
|
|
|
|
|
|
|
|
|
|
/* Search for CPIO_END */ |
|
|
|
/* Search for CPIO_END */ |
|
|
|
do { |
|
|
|
do { |
|
|
|