Better error log.
authorCarl Hetherington <cth@carlh.net>
Fri, 2 Jun 2023 14:43:30 +0000 (16:43 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 2 Jun 2023 14:45:05 +0000 (16:45 +0200)
blockdev/linux/file_dev.c

index 77c6112f71153536b413879d5ae2f4264d2dd2ac..189ca7f4a7b0b6060b0baa7821d6fa9805ab0fed 100644 (file)
@@ -161,7 +161,7 @@ static int file_dev_bwrite(struct ext4_blockdev *bdev, const void *buf,
                return EOK;
        if (write(dev_file, buf, bdev->bdif->ph_bsize * blk_cnt) < 0) {
                ext4_blockdev_errno = errno;
-               printf("write failed %d\n", errno);
+               printf("write to %d of size %d failed with %d\n", errno, dev_file, bdev->bdif->ph_bsize * blk_cnt);
                return EIO;
        }