aboutsummaryrefslogtreecommitdiffstats
path: root/src/boot.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-12-29 21:41:19 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-12-29 21:41:19 -0500
commitca2bc1c0cd65796589a55728fb0837e5e64e5a74 (patch)
treefa9d554ce1772ca302bc4af092ae279b50866ac3 /src/boot.c
parentf13a18090d291f0c7cca6fab61e3ff563ab9400c (diff)
downloadseabios-ca2bc1c0cd65796589a55728fb0837e5e64e5a74.tar.gz
Remove drive->desc field.
The description field is only available during the POST phase - it is confusing to have it live in a structure available through all phases. The description was only used by the boot menu code - pass each drive description directly to the bootlist code. Add a helper (znprintf) to automatically malloc_tmp the required space. Also, fixup ramdisk handling - it was using an incorrect floppy priority.
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/boot.c b/src/boot.c
index 5bb179d2..e83dcdc3 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -166,7 +166,7 @@ bootentry_add(int type, int prio, u32 data, const char *desc)
be->type = type;
be->priority = prio;
be->data = data;
- be->description = desc;
+ be->description = desc ?: "?";
// Add entry in sorted order.
struct bootentry_s **pprev;
@@ -215,24 +215,24 @@ boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio)
}
void
-boot_add_floppy(struct drive_s *drive_g, int prio)
+boot_add_floppy(struct drive_s *drive_g, const char *desc, int prio)
{
bootentry_add(IPL_TYPE_FLOPPY, defPrio(prio, DefaultFloppyPrio)
- , (u32)drive_g, drive_g->desc);
+ , (u32)drive_g, desc);
}
void
-boot_add_hd(struct drive_s *drive_g, int prio)
+boot_add_hd(struct drive_s *drive_g, const char *desc, int prio)
{
bootentry_add(IPL_TYPE_HARDDISK, defPrio(prio, DefaultHDPrio)
- , (u32)drive_g, drive_g->desc);
+ , (u32)drive_g, desc);
}
void
-boot_add_cd(struct drive_s *drive_g, int prio)
+boot_add_cd(struct drive_s *drive_g, const char *desc, int prio)
{
bootentry_add(IPL_TYPE_CDROM, defPrio(prio, DefaultCDPrio)
- , (u32)drive_g, drive_g->desc);
+ , (u32)drive_g, desc);
}
// Add a CBFS payload entry