wok-stable diff busybox/stuff/busybox-1.12.0-cpio-mkdir.u @ rev 5584
Up: xvkbd (3.2)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sun May 16 16:52:07 2010 +0000 (2010-05-16) |
parents | 8a7fbe920ac6 |
children |
line diff
1.1 --- a/busybox/stuff/busybox-1.12.0-cpio-mkdir.u Thu Aug 21 20:11:27 2008 +0000 1.2 +++ b/busybox/stuff/busybox-1.12.0-cpio-mkdir.u Sun May 16 16:52:07 2010 +0000 1.3 @@ -19,3 +19,32 @@ 1.4 && !(archive_handle->ah_flags & ARCHIVE_EXTRACT_QUIET) 1.5 ) { 1.6 bb_perror_msg("cannot make dir %s", file_header->name); 1.7 + 1.8 +--- busybox-1.12.0/archival/cpio.c 1.9 ++++ busybox-1.12.0/archival/cpio.c 1.10 +@@ -30,6 +30,7 @@ 1.11 + * It's ok to exit instead of return. */ 1.12 + static int cpio_o(void) 1.13 + { 1.14 ++ static char trailer[] = "TRAILER!!!"; 1.15 + struct name_s { 1.16 + struct name_s *next; 1.17 + char name[1]; 1.18 +@@ -119,7 +120,7 @@ 1.19 + } else { 1.20 + /* If no (more) hardlinks to output, 1.21 + * output "trailer" entry */ 1.22 +- name = "TRAILER!!!"; 1.23 ++ name = trailer; 1.24 + /* st.st_size == 0 is a must, but for uniformity 1.25 + * in the output, we zero out everything */ 1.26 + memset(&st, 0, sizeof(st)); 1.27 +@@ -167,7 +168,7 @@ 1.28 + } 1.29 + 1.30 + if (!line) { 1.31 +- if (links) 1.32 ++ if (name != trailer) 1.33 + goto next_link; 1.34 + /* TODO: GNU cpio pads trailer to 512 bytes, do we want that? */ 1.35 + return EXIT_SUCCESS;