hush: rename o_quoted to has_quoted_part; small code shrink
[oweals/busybox.git] / util-linux / mkfs_ext2.c
index 1c2b3b2e231924e17eba03cd8e89c764b0fdc064..6dccd3a5d8e7b76a73b891e501c56353e460535f 100644 (file)
@@ -221,7 +221,7 @@ int mkfs_ext2_main(int argc UNUSED_PARAM, char **argv)
 
        // open the device, check the device is a block device
        xmove_fd(xopen(argv[0], O_WRONLY), fd);
-       fstat(fd, &st);
+       xfstat(fd, &st, argv[0]);
        if (!S_ISBLK(st.st_mode) && !(option_mask32 & OPT_F))
                bb_error_msg_and_die("%s: not a block device", argv[0]);