summaryrefslogtreecommitdiff
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c
index 6fd1340..724368b 100644
--- a/archival/libunarchive/get_header_cpio.c
+++ b/archival/libunarchive/get_header_cpio.c
@@ -30,7 +30,7 @@ char get_header_cpio(archive_handle_t *archive_handle)
tmp = saved_hardlinks;
oldtmp = NULL;
- file_header->link_name = file_header->name;
+ file_header->link_target = file_header->name;
file_header->size = 0;
while (tmp) {
@@ -56,7 +56,7 @@ char get_header_cpio(archive_handle_t *archive_handle)
saved_hardlinks = tmp;
}
- file_header->name = file_header->link_name;
+ file_header->name = file_header->link_target;
if (pending_hardlinks > 1) {
bb_error_msg("error resolving hardlink: archive made by GNU cpio 2.0-2.2?");
@@ -122,12 +122,12 @@ char get_header_cpio(archive_handle_t *archive_handle)
}
if (S_ISLNK(file_header->mode)) {
- file_header->link_name = xzalloc(file_header->size + 1);
- xread(archive_handle->src_fd, file_header->link_name, file_header->size);
+ file_header->link_target = xzalloc(file_header->size + 1);
+ xread(archive_handle->src_fd, file_header->link_target, file_header->size);
archive_handle->offset += file_header->size;
file_header->size = 0; /* Stop possible seeks in future */
} else {
- file_header->link_name = NULL;
+ file_header->link_target = NULL;
}
if (nlink > 1 && !S_ISDIR(file_header->mode)) {
if (file_header->size == 0) { /* Put file on a linked list for later */
@@ -154,7 +154,7 @@ char get_header_cpio(archive_handle_t *archive_handle)
archive_handle->offset += file_header->size;
- free(file_header->link_name);
+ free(file_header->link_target);
return EXIT_SUCCESS;
}