2004-08-14 Marco Gerards <metgerards@student.han.nl>

* include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
	with parentheses.

	* fs/ext2.c (FILETYPE_UNKNOWN): New macro.
	(grub_ext2_dir): In case the directory entry type is unknown, read
	it from the inode.
This commit is contained in:
marco_g 2004-08-13 22:33:35 +00:00
parent 0ef123f617
commit cc61b58f99
3 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2004-08-14 Marco Gerards <metgerards@student.han.nl>
* include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
with parentheses.
* fs/ext2.c (FILETYPE_UNKNOWN): New macro.
(grub_ext2_dir): In case the directory entry type is unknown, read
it from the inode.
2004-08-02 Peter Bruin <pjbruin@dds.nl>
* loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass

View File

@ -28,6 +28,7 @@
#define EXT2_MAX_SYMLINKCNT 8
/* Filetype used in directory entry. */
#define FILETYPE_UNKNOWN 0
#define FILETYPE_DIRECTORY 2
#define FILETYPE_SYMLINK 7
@ -688,7 +689,16 @@ grub_ext2_dir (grub_device_t device, const char *path,
filename[dirent.namelen] = '\0';
hook (filename, dirent.filetype == FILETYPE_DIRECTORY);
if (dirent.filetype != FILETYPE_UNKNOWN)
hook (filename, dirent.filetype == FILETYPE_DIRECTORY);
else
{
struct grub_ext2_inode inode;
grub_ext2_read_inode (data, grub_le_to_cpu32 (dirent.inode), &inode);
hook (filename, (grub_le_to_cpu16 (inode.mode)
& FILETYPE_INO_MASK) == FILETYPE_INO_DIRECTORY);
}
}
fpos += grub_le_to_cpu16 (dirent.direntlen);

View File

@ -38,7 +38,7 @@ enum grub_arg_type
typedef enum grub_arg_type grub_arg_type_t;
/* Flags for the option field op grub_arg_option. */
#define GRUB_ARG_OPTION_OPTIONAL 1 << 1
#define GRUB_ARG_OPTION_OPTIONAL (1 << 1)
enum grub_key_type
{