From 534374755d618c9c36c9940c82756241c4b25a67 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 16 Jul 2006 08:14:35 +0000 Subject: Cleaup read() and write() variants, plus a couple of new functions like xlseek and fdlength() for the new mkswap. --- archival/tar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'archival/tar.c') 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, putOctal(header.chksum, 7, chksum); /* Now write the header out to disk */ - if ((size = - bb_full_write(tbInfo->tarFd, (char *) &header, - sizeof(struct TarHeader))) < 0) { + if ((size = full_write(tbInfo->tarFd, (char *) &header, + sizeof(struct TarHeader))) < 0) + { bb_error_msg(bb_msg_io_error, real_name); return (FALSE); } @@ -475,7 +475,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag, while (1) { char buf; - int n = bb_full_read(gzipStatusPipe[0], &buf, 1); + int n = full_read(gzipStatusPipe[0], &buf, 1); if (n == 0 && vfork_exec_errno != 0) { errno = vfork_exec_errno; @@ -562,8 +562,8 @@ static char get_header_tar_Z(archive_handle_t *archive_handle) archive_handle->seek = seek_by_char; /* do the decompression, and cleanup */ - if (bb_xread_char(archive_handle->src_fd) != 0x1f || - bb_xread_char(archive_handle->src_fd) != 0x9d) + if (xread_char(archive_handle->src_fd) != 0x1f || + xread_char(archive_handle->src_fd) != 0x9d) { bb_error_msg_and_die("Invalid magic"); } -- cgit v1.2.3