aboutsummaryrefslogtreecommitdiff
path: root/src/cdrom.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-12-07 13:50:54 +0200
committerKevin O'Connor <kevin@koconnor.net>2010-12-12 14:12:59 -0500
commit4c90a20f86a09ffdcecd9685f11f3fe2674b8b77 (patch)
tree7982abe752449000416b4c9b647f91dbab9111d5 /src/cdrom.c
parent0e6f6366bc1645c151811c575d667a7676c5d53f (diff)
downloadseabios-hppa-4c90a20f86a09ffdcecd9685f11f3fe2674b8b77.zip
seabios-hppa-4c90a20f86a09ffdcecd9685f11f3fe2674b8b77.tar.gz
seabios-hppa-4c90a20f86a09ffdcecd9685f11f3fe2674b8b77.tar.bz2
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cdrom.c b/src/cdrom.c
index 349e401..31ceaaa 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);