summaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_tar.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-20 14:49:47 +0000
committerDenis Vlasenko2007-06-20 14:49:47 +0000
commit75103841072d71603b49ad00648e204ffcca589d (patch)
treec07868b07df1b0aa5889fab67d7fafdb7eb40870 /archival/libunarchive/get_header_tar.c
parent761ce14fd266d8bf78b8f9c83ec2425ede0648b9 (diff)
downloadbusybox-75103841072d71603b49ad00648e204ffcca589d.zip
busybox-75103841072d71603b49ad00648e204ffcca589d.tar.gz
do not do utime() on links, it acts on link targets, and we don't want that.
rename link_name to link_target, less confusing this way.
Diffstat (limited to 'archival/libunarchive/get_header_tar.c')
-rw-r--r--archival/libunarchive/get_header_tar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index b3efdec..d42f4c2 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -141,13 +141,13 @@ char get_header_tar(archive_handle_t *archive_handle)
unsigned major = GET_OCTAL(tar.devmajor);
file_header->device = makedev(major, minor);
}
- file_header->link_name = NULL;
+ file_header->link_target = NULL;
if (!linkname && parse_names && tar.linkname[0]) {
/* we trash magic[0] here, it's ok */
tar.linkname[sizeof(tar.linkname)] = '\0';
- file_header->link_name = xstrdup(tar.linkname);
- /* FIXME: what if we have non-link object with link_name? */
- /* Will link_name be free()ed? */
+ file_header->link_target = xstrdup(tar.linkname);
+ /* FIXME: what if we have non-link object with link_target? */
+ /* Will link_target be free()ed? */
}
file_header->mtime = GET_OCTAL(tar.mtime);
file_header->size = GET_OCTAL(tar.size);
@@ -248,7 +248,7 @@ char get_header_tar(archive_handle_t *archive_handle)
longname = NULL;
}
if (linkname) {
- file_header->link_name = linkname;
+ file_header->link_target = linkname;
linkname = NULL;
}
#endif
@@ -277,7 +277,7 @@ char get_header_tar(archive_handle_t *archive_handle)
}
archive_handle->offset += file_header->size;
- free(file_header->link_name);
+ free(file_header->link_target);
/* Do not free(file_header->name)! */
return EXIT_SUCCESS;