aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-08-31 12:42:06 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-08-31 12:42:06 +0200
commit8d3e225a2d1d980bcedb825f294b6a8041fe3f1b (patch)
treebfd632b8dbc3bb25c23aa437ebd0d2ea37818fe9 /archival
parent4e7dd3c363377aefd6ac60ab4335e773482bcca1 (diff)
downloadbusybox-w32-8d3e225a2d1d980bcedb825f294b6a8041fe3f1b.tar.gz
busybox-w32-8d3e225a2d1d980bcedb825f294b6a8041fe3f1b.tar.bz2
busybox-w32-8d3e225a2d1d980bcedb825f294b6a8041fe3f1b.zip
libbb: add xfstat function
function old new delta xfstat - 25 +25 mkfs_ext2_main 2421 2423 +2 mkfs_reiser_main 1197 1194 -3 next 312 307 -5 ar_main 533 522 -11 mkfs_minix_main 2938 2924 -14 mkfs_vfat_main 1511 1495 -16 writeTarFile 272 255 -17 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66) Total: -39 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c3
-rw-r--r--archival/tar.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/archival/ar.c b/archival/ar.c
index bce62f76d..05556c6cb 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -123,8 +123,7 @@ static int write_ar_archive(archive_handle_t *handle)
123 struct stat st; 123 struct stat st;
124 archive_handle_t *out_handle; 124 archive_handle_t *out_handle;
125 125
126 if (fstat(handle->src_fd, &st) == -1) 126 xfstat(handle->src_fd, &st, handle->ar__name);
127 bb_simple_perror_msg_and_die(handle->ar__name);
128 127
129 /* if archive exists, create a new handle for output. 128 /* if archive exists, create a new handle for output.
130 * we create it in place of the old one. 129 * we create it in place of the old one.
diff --git a/archival/tar.c b/archival/tar.c
index b5cbf4197..2176ad2ac 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -572,8 +572,7 @@ static NOINLINE int writeTarFile(int tar_fd, int verboseFlag,
572 572
573 /* Store the stat info for the tarball's file, so 573 /* Store the stat info for the tarball's file, so
574 * can avoid including the tarball into itself.... */ 574 * can avoid including the tarball into itself.... */
575 if (fstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf) < 0) 575 xfstat(tbInfo.tarFd, &tbInfo.tarFileStatBuf, "can't stat tar file");
576 bb_perror_msg_and_die("can't stat tar file");
577 576
578#if ENABLE_FEATURE_SEAMLESS_GZ || ENABLE_FEATURE_SEAMLESS_BZ2 577#if ENABLE_FEATURE_SEAMLESS_GZ || ENABLE_FEATURE_SEAMLESS_BZ2
579 if (gzip) 578 if (gzip)