diff options
Diffstat (limited to 'archival/libunarchive/data_extract_all.c')
-rw-r--r-- | archival/libunarchive/data_extract_all.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c index 1eb8bb388..77b4de593 100644 --- a/archival/libunarchive/data_extract_all.c +++ b/archival/libunarchive/data_extract_all.c | |||
@@ -34,8 +34,8 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
34 | int res; | 34 | int res; |
35 | 35 | ||
36 | if (archive_handle->flags & ARCHIVE_CREATE_LEADING_DIRS) { | 36 | if (archive_handle->flags & ARCHIVE_CREATE_LEADING_DIRS) { |
37 | char *name = xstrdup(file_header->name); | 37 | char *name = bb_xstrdup(file_header->name); |
38 | make_directory (dirname(name), 0777, FILEUTILS_RECUR); | 38 | bb_make_directory (dirname(name), 0777, FILEUTILS_RECUR); |
39 | free(name); | 39 | free(name); |
40 | } | 40 | } |
41 | 41 | ||
@@ -47,13 +47,13 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
47 | /* hard link */ | 47 | /* hard link */ |
48 | res = link(file_header->link_name, file_header->name); | 48 | res = link(file_header->link_name, file_header->name); |
49 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { | 49 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { |
50 | perror_msg("Couldnt create hard link"); | 50 | bb_perror_msg("Couldnt create hard link"); |
51 | } | 51 | } |
52 | } else | 52 | } else |
53 | #endif | 53 | #endif |
54 | { | 54 | { |
55 | /* Regular file */ | 55 | /* Regular file */ |
56 | dst_fd = xopen(file_header->name, O_WRONLY | O_CREAT); | 56 | dst_fd = bb_xopen(file_header->name, O_WRONLY | O_CREAT); |
57 | archive_copy_file(archive_handle, dst_fd); | 57 | archive_copy_file(archive_handle, dst_fd); |
58 | close(dst_fd); | 58 | close(dst_fd); |
59 | } | 59 | } |
@@ -63,7 +63,7 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
63 | unlink(file_header->name); | 63 | unlink(file_header->name); |
64 | res = mkdir(file_header->name, file_header->mode); | 64 | res = mkdir(file_header->name, file_header->mode); |
65 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { | 65 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { |
66 | perror_msg("extract_archive: %s", file_header->name); | 66 | bb_perror_msg("extract_archive: %s", file_header->name); |
67 | } | 67 | } |
68 | break; | 68 | break; |
69 | case S_IFLNK: | 69 | case S_IFLNK: |
@@ -71,7 +71,7 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
71 | unlink(file_header->name); | 71 | unlink(file_header->name); |
72 | res = symlink(file_header->link_name, file_header->name); | 72 | res = symlink(file_header->link_name, file_header->name); |
73 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { | 73 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { |
74 | perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name); | 74 | bb_perror_msg("Cannot create symlink from %s to '%s'", file_header->name, file_header->link_name); |
75 | } | 75 | } |
76 | break; | 76 | break; |
77 | case S_IFSOCK: | 77 | case S_IFSOCK: |
@@ -81,11 +81,11 @@ extern void data_extract_all(archive_handle_t *archive_handle) | |||
81 | unlink(file_header->name); | 81 | unlink(file_header->name); |
82 | res = mknod(file_header->name, file_header->mode, file_header->device); | 82 | res = mknod(file_header->name, file_header->mode, file_header->device); |
83 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { | 83 | if ((res == -1) && !(archive_handle->flags & ARCHIVE_EXTRACT_QUIET)) { |
84 | perror_msg("Cannot create node %s", file_header->name); | 84 | bb_perror_msg("Cannot create node %s", file_header->name); |
85 | } | 85 | } |
86 | break; | 86 | break; |
87 | default: | 87 | default: |
88 | error_msg_and_die("Unrecognised file type"); | 88 | bb_error_msg_and_die("Unrecognised file type"); |
89 | } | 89 | } |
90 | 90 | ||
91 | chmod(file_header->name, file_header->mode); | 91 | chmod(file_header->name, file_header->mode); |