diff options
author | Rob Landley <rob@landley.net> | 2006-07-16 08:14:35 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-07-16 08:14:35 +0000 |
commit | 534374755d618c9c36c9940c82756241c4b25a67 (patch) | |
tree | fac906b4fa40a68c53cecf20215a7a25b3b1cab6 /archival/tar.c | |
parent | afb94ecf2bb6c53ce2a381d6ce45a426243c76d9 (diff) | |
download | busybox-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/tar.c')
-rw-r--r-- | archival/tar.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/tar.c b/archival/tar.c index 5b7c1425a..426176bd2 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -269,9 +269,9 @@ static inline int writeTarHeader(struct TarBallInfo *tbInfo, | |||
269 | putOctal(header.chksum, 7, chksum); | 269 | putOctal(header.chksum, 7, chksum); |
270 | 270 | ||
271 | /* Now write the header out to disk */ | 271 | /* Now write the header out to disk */ |
272 | if ((size = | 272 | if ((size = full_write(tbInfo->tarFd, (char *) &header, |
273 | bb_full_write(tbInfo->tarFd, (char *) &header, | 273 | sizeof(struct TarHeader))) < 0) |
274 | sizeof(struct TarHeader))) < 0) { | 274 | { |
275 | bb_error_msg(bb_msg_io_error, real_name); | 275 | bb_error_msg(bb_msg_io_error, real_name); |
276 | return (FALSE); | 276 | return (FALSE); |
277 | } | 277 | } |
@@ -475,7 +475,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag, | |||
475 | while (1) { | 475 | while (1) { |
476 | char buf; | 476 | char buf; |
477 | 477 | ||
478 | int n = bb_full_read(gzipStatusPipe[0], &buf, 1); | 478 | int n = full_read(gzipStatusPipe[0], &buf, 1); |
479 | 479 | ||
480 | if (n == 0 && vfork_exec_errno != 0) { | 480 | if (n == 0 && vfork_exec_errno != 0) { |
481 | errno = vfork_exec_errno; | 481 | errno = vfork_exec_errno; |
@@ -562,8 +562,8 @@ static char get_header_tar_Z(archive_handle_t *archive_handle) | |||
562 | archive_handle->seek = seek_by_char; | 562 | archive_handle->seek = seek_by_char; |
563 | 563 | ||
564 | /* do the decompression, and cleanup */ | 564 | /* do the decompression, and cleanup */ |
565 | if (bb_xread_char(archive_handle->src_fd) != 0x1f || | 565 | if (xread_char(archive_handle->src_fd) != 0x1f || |
566 | bb_xread_char(archive_handle->src_fd) != 0x9d) | 566 | xread_char(archive_handle->src_fd) != 0x9d) |
567 | { | 567 | { |
568 | bb_error_msg_and_die("Invalid magic"); | 568 | bb_error_msg_and_die("Invalid magic"); |
569 | } | 569 | } |