summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-11-23 17:14:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-24 09:47:32 +0100
commitde224e9fda73e6c20cd57c0c3b1ca4bdeb8304be (patch)
treeea563fa2aeee2cd48c54197368fb90694d1e3b4a
parentbf2253c2f4d00dde0c81604c17a5f0d508a37550 (diff)
downloadbarebox-de224e9fda73e6c20cd57c0c3b1ca4bdeb8304be.tar.gz
barebox-de224e9fda73e6c20cd57c0c3b1ca4bdeb8304be.tar.xz
commands: boot: include blspec path name in entry title
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@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/blspec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/blspec.c b/common/blspec.c
index a07343f427..4e4ad29eb3 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");