From: Liu Aleaxander Date: Mon, 13 Jul 2009 07:56:51 +0000 (+0800) Subject: Core: fix the hybride mode detection code X-Git-Tag: syslinux-4.00-pre1~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d33dbedfe1cddbf578b86d599cdba7c8356b91e8;p=profile%2Fivi%2Fsyslinux.git Core: fix the hybride mode detection code --- diff --git a/core/diskio.c b/core/diskio.c index 90dccbe..cbd9305 100644 --- a/core/diskio.c +++ b/core/diskio.c @@ -246,15 +246,6 @@ struct disk *disk_init(uint8_t devno, bool cdrom, sector_t part_start, bool ebios = cdrom; int sector_size = cdrom ? 2048 : 512; - /* - * set the size be 512 when we are in iso_hybrid mode. - * we estimate it by the devno, As far as I know, the - * cdrom will use 0xe0 and above as the devno, well I'm - * not sure it's right or not. - */ - if (devno < 0xe0) - sector_size = 512; - memset(&ireg, 0, sizeof ireg); /* Get EBIOS support */ diff --git a/core/isolinux.asm b/core/isolinux.asm index 4b11b43..f369e59 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -1168,7 +1168,13 @@ all_read: extern iso_fs_ops mov eax,iso_fs_ops mov dl,[DriveNumber] - mov dh,1 ; it's cdrom + cmp word [BIOSType],bios_cdrom + jne hybrid + mov dh,1 ; it's cdrom + jmp end +hybrid: + mov dh,0 ; it's in hybrid mode +end: mov ecx,[bsHidden] mov ebx,[bsHidden+4] mov si,[bsHeads]