From 8d3e225a2d1d980bcedb825f294b6a8041fe3f1b Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 31 Aug 2010 12:42:06 +0200 Subject: 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 --- util-linux/mkfs_minix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'util-linux/mkfs_minix.c') diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 9e826aef3..95499ba17 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -686,8 +686,7 @@ int mkfs_minix_main(int argc UNUSED_PARAM, char **argv) bb_error_msg_and_die("can't format mounted filesystem"); xmove_fd(xopen(G.device_name, O_RDWR), dev_fd); - if (fstat(dev_fd, &statbuf) < 0) - bb_error_msg_and_die("can't stat '%s'", G.device_name); + xfstat(dev_fd, &statbuf, G.device_name); if (!S_ISBLK(statbuf.st_mode)) opt &= ~1; // clear -c (check) -- cgit v1.2.3