[PATCH 3/3] commands: boot: include blspec path name in entry title

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Nov 23 11:14:32 EST 2020


barebox linux-appendroot option having the same bootspec file in
different partitions. boot -m will display the same title though,
which doesn't help readability. Append the name of the config
file to make the menu more useful in that case.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/blspec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/blspec.c b/common/blspec.c
index a07343f4274e..4e4ad29eb3c8 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -649,7 +649,8 @@ int blspec_scan_directory(struct bootentries *bootentries, const char *root)
 				hwdevname = xstrdup(dev_name(entry->cdev->dev->parent));
 		}
 
-		entry->entry.title = xstrdup(blspec_entry_var_get(entry, "title"));
+		entry->entry.title = xasprintf("%s (%s)", blspec_entry_var_get(entry, "title"),
+					       configname);
 		entry->entry.description = basprintf("blspec entry, device: %s hwdevice: %s",
 						    devname ? devname : "none",
 						    hwdevname ? hwdevname : "none");
-- 
2.29.2




More information about the barebox mailing list