mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/3] commands: boot: include blspec path name in entry title
Date: Mon, 23 Nov 2020 17:14:32 +0100	[thread overview]
Message-ID: <20201123161432.28064-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20201123161432.28064-1-a.fatoum@pengutronix.de>

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>
---
 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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2020-11-23 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 16:14 [PATCH 1/3] commands: boot: fix error code/clean up behavior when not booting Ahmad Fatoum
2020-11-23 16:14 ` [PATCH 2/3] commands: boot: display each list entry in a separate line Ahmad Fatoum
2020-11-23 16:14 ` Ahmad Fatoum [this message]
2020-11-24  8:47 ` [PATCH 1/3] commands: boot: fix error code/clean up behavior when not booting Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201123161432.28064-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox