fix a bug in the command device, and fix an incompatibility with the new version of ext2fs.

This commit is contained in:
okuji 1999-11-03 04:00:30 +00:00
parent c6ec01220b
commit 7b326e1351
4 changed files with 20 additions and 5 deletions

View file

@ -1,3 +1,13 @@
1999-11-03 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* 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 <bjh21@cam.ac.uk>.
* stage2/builtins.c (device_func) [GRUB_UTIL]: Call
nul_terminate before calling check_device.
1999-11-02 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/disk_io.c (real_open_partition): Check for the right

View file

@ -741,7 +741,10 @@ grub_putchar (int c)
{
#ifdef HAVE_LIBCURSES
if (use_curses)
addch (c);
{
addch (c);
wrefresh (stdscr);
}
else
#endif
putchar (c);

View file

@ -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;

View file

@ -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 */
};