2003-12-30 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/fsys_ext2fs.c (ext2_is_fast_symlink): New function.
	(ext2fs_dir): Use ext2_is_fast_symlink to check if the current
	inode is a fast or slow symlink. This change was required
	because Linux now uses acl seriously (i.e. incompatibility).
	Reported by Chris PeBenito <pebenito@gentoo.org> and Seemant
	Kulleen <seemant@gentoo.org>
This commit is contained in:
okuji 2003-12-30 12:36:13 +00:00
parent 3b2816320b
commit d1d9022b1f
2 changed files with 19 additions and 2 deletions

View file

@ -1,3 +1,12 @@
2003-12-30 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/fsys_ext2fs.c (ext2_is_fast_symlink): New function.
(ext2fs_dir): Use ext2_is_fast_symlink to check if the current
inode is a fast or slow symlink. This change was required
because Linux now uses acl seriously (i.e. incompatibility).
Reported by Chris PeBenito <pebenito@gentoo.org> and Seemant
Kulleen <seemant@gentoo.org>
2003-11-30 Yoshinori K. Okuji <okuji@enbug.org>
* lib/device.c (read_device_map) (sho_warning): New internal

View file

@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
* Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -475,6 +475,14 @@ ext2fs_read (char *buf, int len)
*/
static inline
int ext2_is_fast_symlink (void)
{
int ea_blocks;
ea_blocks = INODE->i_file_acl ? EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE : 0;
return INODE->i_blocks == ea_blocks;
}
/* preconditions: ext2fs_mount already executed, therefore supblk in buffer
* known as SUPERBLOCK
* returns: 0 if error, nonzero iff we were able to find the file successfully
@ -618,7 +626,7 @@ ext2fs_dir (char *dirname)
linkbuf[filemax + len] = '\0';
/* Read the symlink data. */
if (INODE->i_blocks)
if (! ext2_is_fast_symlink ())
{
/* Read the necessary blocks, and reset the file pointer. */
len = grub_read (linkbuf, filemax);