From ff6bc088015606f8b272c694c2a622a006d702e3 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 20 Jul 2016 15:35:22 +0200 Subject: bootentries: Add title/description We currently have to special case blspec entries vs. boot scripts in the common boot code since we want to print different informations about them. This adds a 'title' and 'description' which can be filled in with different information by bootscripts and blspec entries and so we get rid of the special handling. Signed-off-by: Sascha Hauer --- common/blspec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'common/blspec.c') diff --git a/common/blspec.c b/common/blspec.c index d1597f9f7e..dff0928fd2 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -409,11 +409,10 @@ int blspec_scan_directory(struct bootentries *bootentries, const char *root) hwdevname = xstrdup(dev_name(entry->cdev->dev->parent)); } - entry->entry.me.display = basprintf("%-20s %-20s %s", - devname ? devname : "", - hwdevname ? hwdevname : "", - blspec_entry_var_get(entry, "title")); - + entry->entry.title = xstrdup(blspec_entry_var_get(entry, "title")); + entry->entry.description = basprintf("blspec entry, device: %s hwdevice: %s", + devname ? devname : "none", + hwdevname ? hwdevname : "none"); free(devname); free(hwdevname); -- cgit v1.2.3