summaryrefslogtreecommitdiff
path: root/libbb/dump.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-08-31 12:42:06 +0200
committerDenys Vlasenko2010-08-31 12:42:06 +0200
commit8d3e225a2d1d980bcedb825f294b6a8041fe3f1b (patch)
treebfd632b8dbc3bb25c23aa437ebd0d2ea37818fe9 /libbb/dump.c
parent4e7dd3c363377aefd6ac60ab4335e773482bcca1 (diff)
downloadbusybox-8d3e225a2d1d980bcedb825f294b6a8041fe3f1b.zip
busybox-8d3e225a2d1d980bcedb825f294b6a8041fe3f1b.tar.gz
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 'libbb/dump.c')
-rw-r--r--libbb/dump.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbb/dump.c b/libbb/dump.c
index a739ff6..4db3f06 100644
--- a/libbb/dump.c
+++ b/libbb/dump.c
@@ -323,9 +323,7 @@ static void do_skip(priv_dumper_t *dumper, const char *fname, int statok)
struct stat sbuf;
if (statok) {
- if (fstat(STDIN_FILENO, &sbuf)) {
- bb_simple_perror_msg_and_die(fname);
- }
+ xfstat(STDIN_FILENO, &sbuf, fname);
if (!(S_ISCHR(sbuf.st_mode) || S_ISBLK(sbuf.st_mode) || S_ISFIFO(sbuf.st_mode))
&& dumper->pub.dump_skip >= sbuf.st_size
) {