summaryrefslogtreecommitdiff
path: root/archival/rpm2cpio.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-16 08:14:35 +0000
committerRob Landley <rob@landley.net>2006-07-16 08:14:35 +0000
commit534374755d618c9c36c9940c82756241c4b25a67 (patch)
treefac906b4fa40a68c53cecf20215a7a25b3b1cab6 /archival/rpm2cpio.c
parentafb94ecf2bb6c53ce2a381d6ce45a426243c76d9 (diff)
downloadbusybox-w32-534374755d618c9c36c9940c82756241c4b25a67.tar.gz
busybox-w32-534374755d618c9c36c9940c82756241c4b25a67.tar.bz2
busybox-w32-534374755d618c9c36c9940c82756241c4b25a67.zip
Cleaup read() and write() variants, plus a couple of new functions like
xlseek and fdlength() for the new mkswap.
Diffstat (limited to 'archival/rpm2cpio.c')
-rw-r--r--archival/rpm2cpio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index 51807c7e2..6aae150e2 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -40,7 +40,7 @@ static void skip_header(int rpm_fd)
40{ 40{
41 struct rpm_header header; 41 struct rpm_header header;
42 42
43 bb_xread_all(rpm_fd, &header, sizeof(struct rpm_header)); 43 xread(rpm_fd, &header, sizeof(struct rpm_header));
44 if (strncmp((char *) &header.magic, RPM_HEADER_MAGIC, 3) != 0) { 44 if (strncmp((char *) &header.magic, RPM_HEADER_MAGIC, 3) != 0) {
45 bb_error_msg_and_die("Invalid RPM header magic"); /* Invalid magic */ 45 bb_error_msg_and_die("Invalid RPM header magic"); /* Invalid magic */
46 } 46 }
@@ -66,7 +66,7 @@ int rpm2cpio_main(int argc, char **argv)
66 rpm_fd = bb_xopen(argv[1], O_RDONLY); 66 rpm_fd = bb_xopen(argv[1], O_RDONLY);
67 } 67 }
68 68
69 bb_xread_all(rpm_fd, &lead, sizeof(struct rpm_lead)); 69 xread(rpm_fd, &lead, sizeof(struct rpm_lead));
70 if (strncmp((char *) &lead.magic, RPM_MAGIC, 4) != 0) { 70 if (strncmp((char *) &lead.magic, RPM_MAGIC, 4) != 0) {
71 bb_error_msg_and_die("Invalid RPM magic"); /* Just check the magic, the rest is irrelevant */ 71 bb_error_msg_and_die("Invalid RPM magic"); /* Just check the magic, the rest is irrelevant */
72 } 72 }
@@ -78,7 +78,7 @@ int rpm2cpio_main(int argc, char **argv)
78 /* Skip the main header */ 78 /* Skip the main header */
79 skip_header(rpm_fd); 79 skip_header(rpm_fd);
80 80
81 bb_xread_all(rpm_fd, &magic, 2); 81 xread(rpm_fd, &magic, 2);
82 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { 82 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
83 bb_error_msg_and_die("Invalid gzip magic"); 83 bb_error_msg_and_die("Invalid gzip magic");
84 } 84 }