aboutsummaryrefslogtreecommitdiffstats
path: root/src/cdrom.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-08-09 11:32:00 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-08-09 11:32:00 -0400
commita4d70aa537a48fd6ab645435be94246c4e41a2e7 (patch)
tree5f3002094088f083520eb2dc4580492f816b9e4b /src/cdrom.c
parentb9e62d24153d0224aae671f4471d0c79ddbb5f26 (diff)
downloadseabios-a4d70aa537a48fd6ab645435be94246c4e41a2e7.tar.gz
Use regular CD reading to load initial CDROM boot image.
Use cdrom_read() instead of cdrom_read_512() for loading the initial image. The initial image will always start on a 2K block, and it should be okay to load extra sectors if the sector count doesn't end on a 2K boundary.
Diffstat (limited to 'src/cdrom.c')
-rw-r--r--src/cdrom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cdrom.c b/src/cdrom.c
index 8f9e7d0a..8ccbeeab 100644
--- a/src/cdrom.c
+++ b/src/cdrom.c
@@ -463,10 +463,10 @@ cdrom_boot(int cdid)
SET_EBDA2(ebda_seg, cdemu.ilba, lba);
// And we read the image in memory
- dop.lba = lba * 4;
- dop.count = nbsectors;
+ dop.lba = lba;
+ dop.count = DIV_ROUND_UP(nbsectors, 4);
dop.buf_fl = MAKE_FLATPTR(boot_segment, 0);
- ret = cdrom_read_512(&dop);
+ ret = cdrom_read(&dop);
if (ret)
return 12;