diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/ar.c | 3 | ||||
-rw-r--r-- | archival/tar.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/archival/ar.c b/archival/ar.c index bce62f7..05556c6 100644 --- a/archival/ar.c +++ b/archival/ar.c @@ -123,8 +123,7 @@ static int write_ar_archive(archive_handle_t *handle) struct stat st; archive_handle_t *out_handle; - if (fstat(handle->src_fd, &st) == -1) - bb_simple_perror_msg_and_die(handle->ar__name); + xfstat(handle->src_fd, &st, handle->ar__name); /* if archive exists, create a new handle for output. * we create it in place of the old one. diff --git a/archival/tar.c b/archival/tar.c index b5cbf41..2176ad2 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -572,8 +572,7 @@ static NOINLINE int writeTarFile(int tar_fd, int verboseFlag, /* Store the stat info for the tarball's file, so * can avoid including the tarball into itself.... */ - if (fstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf) < 0) - bb_perror_msg_and_die("can't stat tar file"); + xfstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf, "can't stat tar file"); #if ENABLE_FEATURE_SEAMLESS_GZ || ENABLE_FEATURE_SEAMLESS_BZ2 if (gzip) |