summaryrefslogtreecommitdiff
path: root/blockdev/linux/file_dev.c
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-19 00:49:42 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-19 22:24:04 +0100
commita9bc3a175deafa35e1eb214076be22add129360d (patch)
tree9e2af18089fe05d8d7b5ab41f20c0a601f57c6c9 /blockdev/linux/file_dev.c
parentee865fa65f05e348cd4e0bce0552a2725ad5663a (diff)
Add logging to ext4_mkfs.
Diffstat (limited to 'blockdev/linux/file_dev.c')
-rw-r--r--blockdev/linux/file_dev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/blockdev/linux/file_dev.c b/blockdev/linux/file_dev.c
index 4e4cc67..79f9d69 100644
--- a/blockdev/linux/file_dev.c
+++ b/blockdev/linux/file_dev.c
@@ -149,16 +149,20 @@ static void drop_cache(void)
static int file_dev_bwrite(struct ext4_blockdev *bdev, const void *buf,
uint64_t blk_id, uint32_t blk_cnt)
{
+ printf("lseek() %ld\n", blk_id * bdev->bdif->ph_bsize);
if (lseek(dev_file, blk_id * bdev->bdif->ph_bsize, SEEK_SET) < 0) {
printf("fseeko failed %d\n", errno);
return EIO;
}
+ printf("lseek() ok\n");
if (!blk_cnt)
return EOK;
+ printf("write() %d\n", bdev->bdif->ph_bsize * blk_cnt);
if (write(dev_file, buf, bdev->bdif->ph_bsize * blk_cnt) < 0) {
printf("write failed %d\n", errno);
return EIO;
}
+ printf("write() ok\n");
drop_cache();
return EOK;