From 69be37a23375716c47cfb50a0029833540ef9ea1 Mon Sep 17 00:00:00 2001 From: okuji Date: Tue, 31 Aug 1999 03:17:30 +0000 Subject: [PATCH] fix a bug in fat. fix bsd boot in the grub shell. --- ChangeLog | 12 ++++++++++++ stage2/boot.c | 15 +++++++++++++++ stage2/fsys_fat.c | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e5043acd3..7985a530d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +1999-08-31 Pavel Roskin + + * stage2/boot.c [GRUB_UTIL] (bsd_boot_entry): New function. + (bsd_boot) [GRUB_UTIL]: Set ENTRY_ADDR to BSD_BOOT_ENTRY to fake + the *BSD boot. + +1999-08-31 OKUJI Yoshinori + + * stage2/fsys_fat.c (fat_create_blocklist): Cast FAT_BUF to + unsigned short * instead of unsigned long *. Suggested by Pavel + Roskin. + 1999-08-30 OKUJI Yoshinori From Edward Killips : diff --git a/stage2/boot.c b/stage2/boot.c index f832a69f5..edef168ad 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -523,6 +523,17 @@ load_initrd (char *initrd) } +#ifdef GRUB_UTIL +/* Dummy function to fake the *BSD boot. */ +static void +bsd_boot_entry (int flags, int bootdev, int sym_start, int sym_end, + int mem_upper, int mem_lower) +{ + stop (); +} +#endif + + /* * All "*_boot" commands depend on the images being loaded into memory * correctly, the variables in this file being set up correctly, and @@ -538,7 +549,11 @@ bsd_boot (int type, int bootdev, char *arg) int clval = 0, i; struct bootinfo bi; +#ifdef GRUB_UTIL + entry_addr = (entry_func) bsd_boot_entry; +#else stop_floppy (); +#endif while (*(++arg) && *arg != ' '); str = arg; diff --git a/stage2/fsys_fat.c b/stage2/fsys_fat.c index c9ad9da0e..6f504576c 100644 --- a/stage2/fsys_fat.c +++ b/stage2/fsys_fat.c @@ -124,7 +124,7 @@ fat_create_blocklist (int first_fat_entry) } first_fat_entry - = *((unsigned long *) (FAT_BUF + (new_mapblock - mapblock))); + = *((unsigned short *) (FAT_BUF + (new_mapblock - mapblock))); if (fat_size == 3) {