diff mbox series

fstools: partname: use device string path

Message ID 20251124114754.997780-1-paul.henrys_ext@softathome.com
State New
Headers show
Series fstools: partname: use device string path | expand

Commit Message

Paul HENRYS Nov. 24, 2025, 11:47 a.m. UTC
partname_volume_init() calls block_volume_format() passing the device path.

Previously the parent path was passed typically leading to retrieve the
size of the parent device and not the device to be formatted. Eventually,
formatting the block device with mkfs.f2fs failed silently when the block
device is too small and created a ram overlayfs instead of trying to format
with ext4.

Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
---
 libfstools/partname.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libfstools/partname.c b/libfstools/partname.c
index 9f2347a..836abf0 100644
--- a/libfstools/partname.c
+++ b/libfstools/partname.c
@@ -56,7 +56,7 @@  static int partname_volume_init(struct volume *v)
 	v->size = volsize << 9; /* size is returned in sectors of 512 bytes */
 	v->blk = p->dev.devpathstr;
 
-	return block_volume_format(v, 0, p->parent_dev.devpathstr);
+	return block_volume_format(v, 0, p->dev.devpathstr);
 }
 
 /* adapted from procd/utils.c -> should go to libubox */