From 7b326e1351fcd07da44d41e401d4786c762df669 Mon Sep 17 00:00:00 2001 From: okuji Date: Wed, 3 Nov 1999 04:00:30 +0000 Subject: [PATCH] fix a bug in the command device, and fix an incompatibility with the new version of ext2fs. --- ChangeLog | 10 ++++++++++ grub/asmstub.c | 5 ++++- stage2/builtins.c | 7 ++++--- stage2/fsys_ext2fs.c | 3 ++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index eee41954b..505cc0b7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-11-03 OKUJI Yoshinori + + * stage2/fsys_ext2fs.c (struct ext2_dir_entry): Changed the type + of `name_len' to __u8 and added the new member `file_type' after + it. This is stolen from linux/ext2_fs.h in Linux 2.2.13. + Reported by Ben Harris . + + * stage2/builtins.c (device_func) [GRUB_UTIL]: Call + nul_terminate before calling check_device. + 1999-11-02 OKUJI Yoshinori * stage2/disk_io.c (real_open_partition): Check for the right diff --git a/grub/asmstub.c b/grub/asmstub.c index 9998e6b2b..1f547b5f3 100644 --- a/grub/asmstub.c +++ b/grub/asmstub.c @@ -741,7 +741,10 @@ grub_putchar (int c) { #ifdef HAVE_LIBCURSES if (use_curses) - addch (c); + { + addch (c); + wrefresh (stdscr); + } else #endif putchar (c); diff --git a/stage2/builtins.c b/stage2/builtins.c index 7de1b4038..0906ebd0f 100644 --- a/stage2/builtins.c +++ b/stage2/builtins.c @@ -453,15 +453,16 @@ device_func (char *arg, int flags) /* Get the device argument. */ device = skip_to (0, drive); + + /* Terminate DEVICE. */ + nul_terminate (device); + if (! *device || ! check_device (device)) { errnum = ERR_FILE_NOT_FOUND; return 1; } - /* Terminate DEVICE. */ - nul_terminate (device); - assign_device_name (current_drive, device); return 0; diff --git a/stage2/fsys_ext2fs.c b/stage2/fsys_ext2fs.c index 64ffd9df4..16130b2dc 100644 --- a/stage2/fsys_ext2fs.c +++ b/stage2/fsys_ext2fs.c @@ -176,7 +176,8 @@ struct ext2_dir_entry { __u32 inode; /* Inode number */ __u16 rec_len; /* Directory entry length */ - __u16 name_len; /* Name length */ + __u8 name_len; /* Name length */ + __u8 file_type; char name[EXT2_NAME_LEN]; /* File name */ };