diff --git a/ChangeLog b/ChangeLog index 6cdd1d579..57f5856b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2007-05-17 Jeroen Dekkers + + * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add + __attribute_ ((unused)) to mode_type argument. + + * util/getroot.c (grub_guess_root_device): Fix #endif. + + * kern/misc.c (memcmp): Fix prototype. + + * include/grub/partition.h [GRUB_UTIL] + (grub_gpt_partition_map_init): Add prototype. + (grub_gpt_partition_map_fini): Likewise. + + * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed) + at the right place. + + * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U. + (grub_fat_read_data): Likewise. + (grub_fat_find_dir): Likewise. + + * font/manager.c (find_glyph): Make table a const. + (grub_font_get_glyph): Remove bitmap from if statement. + 2007-05-16 Jeroen Dekkers * util/getroot.c (grub_guess_root_device): Remove RAID and LVM diff --git a/font/manager.c b/font/manager.c index 8e53d9e50..da873a763 100644 --- a/font/manager.c +++ b/font/manager.c @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2003,2005,2006 Free Software Foundation, Inc. + * Copyright (C) 2003,2005,2006,2007 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 @@ -127,7 +127,7 @@ find_glyph (const struct font *font, grub_uint32_t code) { grub_uint32_t start = 0; grub_uint32_t end = font->num - 1; - struct entry *table = font->table; + const struct entry *table = font->table; /* This shouldn't happen. */ if (font->num == 0) @@ -206,9 +206,8 @@ grub_font_get_glyph (grub_uint32_t code, goto restart; } - if (bitmap - && (grub_file_read (font->file, (char *) bitmap, w * 16) - != (grub_ssize_t) w * 16)) + if (grub_file_read (font->file, (char *) bitmap, w * 16) + != (grub_ssize_t) w * 16) { remove_font (font); goto restart; diff --git a/fs/fat.c b/fs/fat.c index f2afae826..325094bb3 100644 --- a/fs/fat.c +++ b/fs/fat.c @@ -1,7 +1,7 @@ /* fat.c - FAT filesystem */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. + * Copyright (C) 2000,2001,2002,2003,2004,2005,2007 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 @@ -243,7 +243,7 @@ grub_fat_mount (grub_disk_t disk) else { /* FAT12 or FAT16. */ - data->root_cluster = ~0UL; + data->root_cluster = ~0U; if (data->num_clusters <= 4085 + 2) { @@ -297,7 +297,7 @@ grub_fat_mount (grub_disk_t disk) /* Start from the root directory. */ data->file_cluster = data->root_cluster; - data->cur_cluster_num = ~0UL; + data->cur_cluster_num = ~0U; data->attr = GRUB_FAT_ATTR_DIRECTORY; return data; @@ -322,7 +322,7 @@ grub_fat_read_data (grub_disk_t disk, struct grub_fat_data *data, /* This is a special case. FAT12 and FAT16 doesn't have the root directory in clusters. */ - if (data->file_cluster == ~0UL) + if (data->file_cluster == ~0U) { size = (data->num_root_sectors << GRUB_DISK_SECTOR_BITS) - offset; if (size > len) @@ -618,7 +618,7 @@ grub_fat_find_dir (grub_disk_t disk, struct grub_fat_data *data, data->file_size = grub_le_to_cpu32 (dir.file_size); data->file_cluster = ((grub_le_to_cpu16 (dir.first_cluster_high) << 16) | grub_le_to_cpu16 (dir.first_cluster_low)); - data->cur_cluster_num = ~0UL; + data->cur_cluster_num = ~0U; return dirp; } diff --git a/fs/jfs.c b/fs/jfs.c index db54a0e10..9ec22623d 100644 --- a/fs/jfs.c +++ b/fs/jfs.c @@ -166,11 +166,11 @@ struct grub_jfs_inode union { /* The tree describing the extents of the file. */ - struct + struct __attribute__ ((packed)) { struct grub_jfs_treehead tree; struct grub_jfs_tree_extent extents[16]; - } file __attribute__ ((packed)); + } file; union { /* The tree describing the dirents. */ diff --git a/include/grub/partition.h b/include/grub/partition.h index 9b95753bc..e09e8bf07 100644 --- a/include/grub/partition.h +++ b/include/grub/partition.h @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999,2000,2001,2002,2004,2006 Free Software Foundation, Inc. + * Copyright (C) 1999,2000,2001,2002,2004,2006,2007 Free Software Foundation, Inc. * * GRUB is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -93,6 +93,8 @@ void grub_apple_partition_map_init (void); void grub_apple_partition_map_fini (void); void grub_sun_partition_map_init (void); void grub_sun_partition_map_fini (void); +void grub_gpt_partition_map_init (void); +void grub_gpt_partition_map_fini (void); #endif static inline grub_disk_addr_t diff --git a/kern/misc.c b/kern/misc.c index 1e4ffdf7f..80b3a0089 100644 --- a/kern/misc.c +++ b/kern/misc.c @@ -1,7 +1,7 @@ /* misc.c - definitions of misc functions */ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc. + * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc. * * GRUB is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -174,7 +174,7 @@ grub_memcmp (const void *s1, const void *s2, grub_size_t n) return 0; } -void *memcmp (const void *s1, const void *s2, grub_size_t n) +int memcmp (const void *s1, const void *s2, grub_size_t n) __attribute__ ((alias ("grub_memcmp"))); int diff --git a/util/getroot.c b/util/getroot.c index 836b3880d..47ca8f9ca 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -231,7 +231,7 @@ grub_guess_root_device (const char *dir) LVM. */ os_dev = find_root_device ("/dev/mapper", st.st_dev); if (!os_dev) -#endif __linux_ +#endif { /* This might be truly slow, but is there any better way? */ os_dev = find_root_device ("/dev", st.st_dev); diff --git a/video/i386/pc/vbe.c b/video/i386/pc/vbe.c index 094dc676d..26eeba278 100644 --- a/video/i386/pc/vbe.c +++ b/video/i386/pc/vbe.c @@ -1,6 +1,6 @@ /* * GRUB -- GRand Unified Bootloader - * Copyright (C) 2005,2006 Free Software Foundation, Inc. + * Copyright (C) 2005,2006,2007 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 @@ -1399,7 +1399,7 @@ grub_video_vbe_swap_buffers (void) static grub_err_t grub_video_vbe_create_render_target (struct grub_video_render_target **result, unsigned int width, unsigned int height, - unsigned int mode_type) + unsigned int mode_type __attribute__ ((unused))) { struct grub_video_render_target *target; unsigned int size;