diff --git a/ChangeLog b/ChangeLog index 480056013..8e522c355 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-07-30 OKUJI Yoshinori + + From Pavel Roskin : + * stage2/asm.S (get_diskinfo_standard): If the number of sectors + returned is zero, then return an error code, even if non-carrier. + 1999-07-15 Gordon Matzigkeit * docs/Makefile.am (grub.info): Use an ugly hack to downgrade diff --git a/stage2/asm.S b/stage2/asm.S index 3143737e9..2bf294ef6 100644 --- a/stage2/asm.S +++ b/stage2/asm.S @@ -596,6 +596,15 @@ ENTRY(get_diskinfo_standard) .code16 movb $0x8, %ah int $0x13 /* do the operation */ + /* check if successful */ + testb %ah, %ah + jnz 1f + /* bogus BIOSes may not return an error number */ + testb $0x3f, %cl /* 0 sectors means no disk */ + jnz 1f /* if non-zero, then succeed */ + /* XXX 0x60 is one of the unused error numbers */ + movb $0x60, %ah +1: movb %ah, %bl /* save return value in %bl */ /* back to protected mode */ data32