wok view busybox/stuff/busybox-1.22-cpio.u @ rev 17414
busybox: fake GNU cpio for symlinks
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 01 10:38:15 2014 +0100 (2014-12-01) |
parents | |
children |
line source
1 --- busybox-1.22.0/archival/cpio.c
2 +++ busybox-1.22.0/archival/cpio.c
3 @@ -225,6 +225,9 @@
4 if (!(S_ISLNK(st.st_mode) || S_ISREG(st.st_mode)))
5 st.st_size = 0; /* paranoia */
7 + if (S_ISLNK(st.st_mode))
8 + st.st_nlink = 1; /* like GNU cpio */
9 +
10 /* Store hardlinks for later processing, dont output them */
11 if (!S_ISDIR(st.st_mode) && st.st_nlink > 1) {
12 struct name_s *n;