aboutsummaryrefslogtreecommitdiffstats
path: root/src/boot.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-09-21 09:35:03 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-10-05 13:28:27 +0200
commit14221cd86eadba82255fdc55ed174d401c7a0a04 (patch)
tree7dc392debe12c18dd1649b63cb02bc4e1a41fc27 /src/boot.c
parentbf8e4f902c3608f9e76bba3710812e51560a2ccc (diff)
downloadseabios-14221cd86eadba82255fdc55ed174d401c7a0a04.tar.gz
pretty boot menu entry for cdrom drives
Show the volume label of bootable cdroms. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/boot.c b/src/boot.c
index ff705fd4..9f82f3ca 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -395,6 +395,16 @@ boot_add_hd(struct drive_s *drive, const char *desc, int prio)
void
boot_add_cd(struct drive_s *drive, const char *desc, int prio)
{
+ if (GET_GLOBAL(PlatformRunningOn) & PF_QEMU) {
+ // We want short boot times. But on physical hardware even
+ // the test unit ready can take several seconds. So do media
+ // access on qemu only, where we know it will be fast.
+ char *extra = cdrom_media_info(drive);
+ if (extra) {
+ desc = znprintf(MAXDESCSIZE, "%s (%s)", desc, extra);
+ free(extra);
+ }
+ }
bootentry_add(IPL_TYPE_CDROM, defPrio(prio, DefaultCDPrio)
, (u32)drive, desc);
}