From 219ad4262ce48fdc619649533bd1ec1ad2f3894e Mon Sep 17 00:00:00 2001 From: okuji Date: Sat, 15 Oct 2005 17:28:36 +0000 Subject: [PATCH] 2005-10-15 Yoshinori K. Okuji * kern/file.c (grub_file_seek): Seeking to an offset equal to a file size must be permitted. * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake between %ah and %al. --- ChangeLog | 8 ++++++++ kern/file.c | 2 +- kern/i386/pc/startup.S | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f07e8da7a..701154b72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-10-15 Yoshinori K. Okuji + + * kern/file.c (grub_file_seek): Seeking to an offset equal to a + file size must be permitted. + + * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake + between %ah and %al. + 2005-10-15 Yoshinori K. Okuji * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to diff --git a/kern/file.c b/kern/file.c index d7d625b3e..4ffbe5c23 100644 --- a/kern/file.c +++ b/kern/file.c @@ -146,7 +146,7 @@ grub_file_seek (grub_file_t file, grub_ssize_t offset) { grub_ssize_t old; - if (offset < 0 || offset >= file->size) + if (offset < 0 || offset > file->size) { grub_error (GRUB_ERR_OUT_OF_RANGE, "attempt to seek outside of the file"); diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index de35c1022..f5beec4a1 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -149,12 +149,12 @@ multiboot_trampoline: movl %edx, %eax shrl $8, %eax xorl %ebx, %ebx - cmpb $0xFF, %al + cmpb $0xFF, %ah je 1f movb %ah, %bl movl %ebx, EXT_C(grub_install_dos_part) 1: - cmpb $0xFF, %ah + cmpb $0xFF, %al je 2f movb %al, %bl movl %ebx, EXT_C(grub_install_bsd_part)