wok-stable rev 618
busybox/cpio: -o put a \n to stderr (like gnu/cpio)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Apr 19 12:09:45 2008 +0000 (2008-04-19) |
parents | 6636425b2636 |
children | 87b81df312aa |
files | busybox/stuff/busybox-1.10.0-cpio.u |
line diff
1.1 --- a/busybox/stuff/busybox-1.10.0-cpio.u Sat Apr 19 11:55:34 2008 +0000 1.2 +++ b/busybox/stuff/busybox-1.10.0-cpio.u Sat Apr 19 12:09:45 2008 +0000 1.3 @@ -104,7 +104,6 @@ 1.4 + else links->st.st_size = 0; // not last link: no data 1.5 + free(n); 1.6 + } 1.7 -+ 1.8 + bytes += printf("070701%08lx%08lx%08lx%08lx%08lx%08lx%08lx" 1.9 + "%08lx%08lx%08lx%08lx%08lx%08lx%s%c", 1.10 + (unsigned long) inode->st.st_ino, 1.11 @@ -121,9 +120,7 @@ 1.12 + strlen(name) + 1UL, 0UL, name, 0); 1.13 + 1.14 + cpio_pad(&bytes, (line) ? 4-1 : 512-1); 1.15 -+ 1.16 + if (inode->st.st_size) { 1.17 -+ 1.18 + if (S_ISLNK(inode->st.st_mode)) { 1.19 + char *lpath = xmalloc_readlink_or_warn(name); 1.20 + 1.21 @@ -146,7 +143,10 @@ 1.22 + cpio_pad(&bytes, 4-1); 1.23 + } 1.24 + 1.25 -+ if (!line) return; // was trailer 1.26 ++ if (!line) { 1.27 ++ fputc('\n', stderr); // GNU cpio do that... 1.28 ++ return; // was trailer 1.29 ++ } 1.30 + 1.31 + free_and_continue: 1.32 + if (!inode->names) free(inode);