[PATCH master] partition: fix reference to wrong cdev in warning message
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Mar 18 01:24:35 PDT 2025
For MBR and GPT, barebox creates links to the partitions, so they can be
referenced both by index and partition label.
Failing to create a link is not an error, but results in a warning
message. The current message claims that the link was pointing at the
parent block device's cdev, but it actually was pointing at the child
partition. Fix that.
Reported-by: Uwe Kleine-König <uwe at kleine-koenig.org>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/partitions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/partitions.c b/common/partitions.c
index 7562536cf9b8..bc90f51f6112 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -63,7 +63,7 @@ static int register_one_partition(struct block_device *blk, struct partition *pa
ret = devfs_create_link(cdev, partition_name);
if (ret)
dev_warn(blk->dev, "Failed to create link from %s to %s\n",
- partition_name, blk->cdev.name);
+ partition_name, cdev->name);
free(partition_name);
return 0;
--
2.39.5
More information about the barebox
mailing list