aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_cpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive/get_header_cpio.c')
-rw-r--r--archival/libunarchive/get_header_cpio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c
index ea0857840..975e2a4bd 100644
--- a/archival/libunarchive/get_header_cpio.c
+++ b/archival/libunarchive/get_header_cpio.c
@@ -46,7 +46,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
46 oldtmp = NULL; 46 oldtmp = NULL;
47 47
48 while (tmp) { 48 while (tmp) {
49 error_msg_and_die("need to fix this\n"); 49 bb_error_msg_and_die("need to fix this\n");
50 if (tmp->entry->link_name) { /* Found a hardlink ready to be extracted */ 50 if (tmp->entry->link_name) { /* Found a hardlink ready to be extracted */
51 file_header = tmp->entry; 51 file_header = tmp->entry;
52 if (oldtmp) { 52 if (oldtmp) {
@@ -78,11 +78,11 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
78 cpio_header[2], 78 cpio_header[2],
79 cpio_header[3], 79 cpio_header[3],
80 cpio_header[4]); 80 cpio_header[4]);
81 error_msg_and_die("Unsupported cpio format"); 81 bb_error_msg_and_die("Unsupported cpio format");
82 } 82 }
83 83
84 if ((cpio_header[5] != '1') && (cpio_header[5] != '2')) { 84 if ((cpio_header[5] != '1') && (cpio_header[5] != '2')) {
85 error_msg_and_die("Unsupported cpio format, use newc or crc"); 85 bb_error_msg_and_die("Unsupported cpio format, use newc or crc");
86 } 86 }
87 87
88 { 88 {
@@ -109,7 +109,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
109 hardlinks_t *tmp = saved_hardlinks; 109 hardlinks_t *tmp = saved_hardlinks;
110 hardlinks_t *oldtmp = NULL; 110 hardlinks_t *oldtmp = NULL;
111 while (tmp) { 111 while (tmp) {
112 error_msg("%s not created: cannot resolve hardlink", tmp->entry->name); 112 bb_error_msg("%s not created: cannot resolve hardlink", tmp->entry->name);
113 oldtmp = tmp; 113 oldtmp = tmp;
114 tmp = tmp->next; 114 tmp = tmp->next;
115 free (oldtmp->entry->name); 115 free (oldtmp->entry->name);
@@ -142,13 +142,13 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
142 pending_hardlinks = 1; 142 pending_hardlinks = 1;
143 while (tmp) { 143 while (tmp) {
144 if (tmp->inode == inode) { 144 if (tmp->inode == inode) {
145 tmp->entry->link_name = xstrdup(file_header->name); 145 tmp->entry->link_name = bb_xstrdup(file_header->name);
146 nlink--; 146 nlink--;
147 } 147 }
148 tmp = tmp->next; 148 tmp = tmp->next;
149 } 149 }
150 if (nlink > 1) { 150 if (nlink > 1) {
151 error_msg("error resolving hardlink: did you create the archive with GNU cpio 2.0-2.2?"); 151 bb_error_msg("error resolving hardlink: did you create the archive with GNU cpio 2.0-2.2?");
152 } 152 }
153 } 153 }
154 } 154 }
@@ -165,11 +165,11 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
165 if ((archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) || (statbuf.st_mtime < file_header->mtime)) { 165 if ((archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) || (statbuf.st_mtime < file_header->mtime)) {
166 /* Remove file if flag set or its older than the file to be extracted */ 166 /* Remove file if flag set or its older than the file to be extracted */
167 if (unlink(file_header->name) == -1) { 167 if (unlink(file_header->name) == -1) {
168 perror_msg_and_die("Couldnt remove old file"); 168 bb_perror_msg_and_die("Couldnt remove old file");
169 } 169 }
170 } else { 170 } else {
171 if (! archive_handle->flags & ARCHIVE_EXTRACT_QUIET) { 171 if (! archive_handle->flags & ARCHIVE_EXTRACT_QUIET) {
172 error_msg("%s not created: newer or same age file exists", file_header->name); 172 bb_error_msg("%s not created: newer or same age file exists", file_header->name);
173 } 173 }
174 extract_flag = FALSE; 174 extract_flag = FALSE;
175 } 175 }