diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-12-07 13:50:54 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-12-12 14:12:59 -0500 |
commit | 4c90a20f86a09ffdcecd9685f11f3fe2674b8b77 (patch) | |
tree | 7982abe752449000416b4c9b647f91dbab9111d5 /src/cdrom.c | |
parent | 0e6f6366bc1645c151811c575d667a7676c5d53f (diff) | |
download | seabios-4c90a20f86a09ffdcecd9685f11f3fe2674b8b77.tar.gz |
Create separate IPL entry for each CD/DVD
Current code creates only one IPL entry of type IPL_TYPE_CDROM even if
there are more then one CDROM drive present. If CDROM that the entry
refers to is not bootable there is no way to retry boot from another
CDROM. Fix this by creating IPL entry for each CDROM drive found. First
CDROM will always be placed in IPL entry 3 for backwards compatibility.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'src/cdrom.c')
-rw-r--r-- | src/cdrom.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cdrom.c b/src/cdrom.c index 349e401b..31ceaaaa 100644 --- a/src/cdrom.c +++ b/src/cdrom.c @@ -241,12 +241,13 @@ atapi_is_ready(struct disk_op_s *op) } int -cdrom_boot(int cdid) +cdrom_boot(struct drive_s *drive_g) { struct disk_op_s dop; + int cdid = getDriveId(EXTTYPE_CD, drive_g); memset(&dop, 0, sizeof(dop)); - dop.drive_g = getDrive(EXTTYPE_CD, cdid); - if (!dop.drive_g) + dop.drive_g = drive_g; + if (!dop.drive_g || cdid < 0) return 1; int ret = atapi_is_ready(&dop); |