diff options
Diffstat (limited to 'archival/rpm.c')
-rw-r--r-- | archival/rpm.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index 61486cb03..5bde53285 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -116,7 +116,7 @@ int rpm_main(int argc, char **argv) | |||
116 | break; | 116 | break; |
117 | case 'q': // First arg: Query mode | 117 | case 'q': // First arg: Query mode |
118 | if (!func) func |= rpm_query; | 118 | if (!func) func |= rpm_query; |
119 | else show_usage(); | 119 | else bb_show_usage(); |
120 | break; | 120 | break; |
121 | case 'p': // Query a package | 121 | case 'p': // Query a package |
122 | func |= rpm_query_package; | 122 | func |= rpm_query_package; |
@@ -133,13 +133,13 @@ int rpm_main(int argc, char **argv) | |||
133 | func |= rpm_query_list_config; | 133 | func |= rpm_query_list_config; |
134 | break; | 134 | break; |
135 | default: | 135 | default: |
136 | show_usage(); | 136 | bb_show_usage(); |
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
140 | if (optind == argc) show_usage(); | 140 | if (optind == argc) bb_show_usage(); |
141 | while (optind < argc) { | 141 | while (optind < argc) { |
142 | rpm_fd = xopen(argv[optind], O_RDONLY); | 142 | rpm_fd = bb_xopen(argv[optind], O_RDONLY); |
143 | mytags = rpm_gettags(rpm_fd, (int *) &tagcount); | 143 | mytags = rpm_gettags(rpm_fd, (int *) &tagcount); |
144 | offset = lseek(rpm_fd, 0, SEEK_CUR); | 144 | offset = lseek(rpm_fd, 0, SEEK_CUR); |
145 | if (!mytags) { printf("Error reading rpm header\n"); exit(-1); } | 145 | if (!mytags) { printf("Error reading rpm header\n"); exit(-1); } |
@@ -206,9 +206,9 @@ void extract_cpio_gz(int fd) { | |||
206 | archive_handle->src_fd = fd; | 206 | archive_handle->src_fd = fd; |
207 | archive_handle->offset = 0; | 207 | archive_handle->offset = 0; |
208 | 208 | ||
209 | xread_all(archive_handle->src_fd, &magic, 2); | 209 | bb_xread_all(archive_handle->src_fd, &magic, 2); |
210 | if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { | 210 | if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { |
211 | error_msg_and_die("Invalid gzip magic"); | 211 | bb_error_msg_and_die("Invalid gzip magic"); |
212 | } | 212 | } |
213 | check_header_gzip(archive_handle->src_fd); | 213 | check_header_gzip(archive_handle->src_fd); |
214 | chdir("/"); // Install RPM's to root | 214 | chdir("/"); // Install RPM's to root |
@@ -314,7 +314,7 @@ void fileaction_dobackup(char *filename, int fileref) | |||
314 | if (rpm_getint(RPMTAG_FILEFLAGS, fileref) & RPMFILE_CONFIG) { /* Only need to backup config files */ | 314 | if (rpm_getint(RPMTAG_FILEFLAGS, fileref) & RPMFILE_CONFIG) { /* Only need to backup config files */ |
315 | stat_res = lstat (filename, &oldfile); | 315 | stat_res = lstat (filename, &oldfile); |
316 | if (stat_res == 0 && S_ISREG(oldfile.st_mode)) { /* File already exists - really should check MD5's etc to see if different */ | 316 | if (stat_res == 0 && S_ISREG(oldfile.st_mode)) { /* File already exists - really should check MD5's etc to see if different */ |
317 | newname = xstrdup(filename); | 317 | newname = bb_xstrdup(filename); |
318 | newname = strcat(newname, ".rpmorig"); | 318 | newname = strcat(newname, ".rpmorig"); |
319 | copy_file(filename, newname, FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS); | 319 | copy_file(filename, newname, FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS); |
320 | remove_file(filename, FILEUTILS_RECUR | FILEUTILS_FORCE); | 320 | remove_file(filename, FILEUTILS_RECUR | FILEUTILS_FORCE); |