summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_minix.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mkfs_minix.c')
-rw-r--r--util-linux/mkfs_minix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index 9e826ae..95499ba 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)