+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
/*
* 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
*/
+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
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);