From 9959f7dbb57a4ca533c9fa6c24dc18f6efd2c0ea Mon Sep 17 00:00:00 2001 From: marco_g Date: Thu, 2 Aug 2007 18:40:37 +0000 Subject: [PATCH] 2007-08-02 Bean * disk.h (grub_disk): Use NESTED_FUNC_ATTR. * file.h (grub_file): Likewise. * fshelp.h (grub_fshelp_read_file): Likewise. * util/i386/pc/grub-setup.c (setup): Likewise. (save_first_sector): Likewise. (save_blocklists): Likewise. * fs/affs.c (grub_affs_read_file): Likewise. * fs/ext2.c (grub_ext2_read_file): Likewise. * fs/fat.c (grub_fat_read_data): Likewise. * fs/fshelp.c (grub_fshelp_read_file): Likewise. * fs/hfs.c (grub_hfs_read_file): Likewise. * fs/hfsplus.c (grub_hfsplus_read_file): Likewise. * fs/jfs.c (grub_jfs_read_file): Likewise. * fs/minix.c (grub_minix_read_file): Likewise. * fs/sfs.c (grub_sfs_read_file): Likewise. * fs/ufs.c (grub_ufs_read_file): Likewise. * fs/xfs.c (grub_xfs_read_file): Likewise. * command/blocklist.c (read_blocklist): Likewise. (print_blocklist): Likewise. --- ChangeLog | 37 +++++++++++++++++++++++++++++++++++++ commands/blocklist.c | 8 ++++---- fs/affs.c | 2 +- fs/ext2.c | 2 +- fs/fat.c | 2 +- fs/fshelp.c | 2 +- fs/hfs.c | 2 +- fs/hfsplus.c | 2 +- fs/jfs.c | 2 +- fs/minix.c | 2 +- fs/sfs.c | 2 +- fs/ufs.c | 2 +- fs/xfs.c | 2 +- include/grub/disk.h | 2 +- include/grub/file.h | 2 +- include/grub/fshelp.h | 2 +- util/i386/pc/grub-setup.c | 8 ++++---- 17 files changed, 59 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a68b800c..78113894a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2007-08-02 Bean + + * disk.h (grub_disk): Use NESTED_FUNC_ATTR. + + * file.h (grub_file): Likewise. + + * fshelp.h (grub_fshelp_read_file): Likewise. + + * util/i386/pc/grub-setup.c (setup): Likewise. + (save_first_sector): Likewise. + (save_blocklists): Likewise. + + * fs/affs.c (grub_affs_read_file): Likewise. + + * fs/ext2.c (grub_ext2_read_file): Likewise. + + * fs/fat.c (grub_fat_read_data): Likewise. + + * fs/fshelp.c (grub_fshelp_read_file): Likewise. + + * fs/hfs.c (grub_hfs_read_file): Likewise. + + * fs/hfsplus.c (grub_hfsplus_read_file): Likewise. + + * fs/jfs.c (grub_jfs_read_file): Likewise. + + * fs/minix.c (grub_minix_read_file): Likewise. + + * fs/sfs.c (grub_sfs_read_file): Likewise. + + * fs/ufs.c (grub_ufs_read_file): Likewise. + + * fs/xfs.c (grub_xfs_read_file): Likewise. + + * command/blocklist.c (read_blocklist): Likewise. + (print_blocklist): Likewise. + 2007-08-02 Marco Gerards * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and diff --git a/commands/blocklist.c b/commands/blocklist.c index cac83098e..df0e63227 100644 --- a/commands/blocklist.c +++ b/commands/blocklist.c @@ -36,12 +36,12 @@ grub_cmd_blocklist (struct grub_arg_list *state __attribute__ ((unused)), unsigned num_sectors = 0; int num_entries = 0; grub_disk_addr_t part_start = 0; - auto void read_blocklist (grub_disk_addr_t sector, unsigned offset, + auto void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset, unsigned length); - auto void print_blocklist (grub_disk_addr_t sector, unsigned num, + auto void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num, unsigned offset, unsigned length); - void read_blocklist (grub_disk_addr_t sector, unsigned offset, + void NESTED_FUNC_ATTR read_blocklist (grub_disk_addr_t sector, unsigned offset, unsigned length) { if (num_sectors > 0) @@ -66,7 +66,7 @@ grub_cmd_blocklist (struct grub_arg_list *state __attribute__ ((unused)), print_blocklist (sector, 0, offset, length); } - void print_blocklist (grub_disk_addr_t sector, unsigned num, + void NESTED_FUNC_ATTR print_blocklist (grub_disk_addr_t sector, unsigned num, unsigned offset, unsigned length) { if (num_entries++) diff --git a/fs/affs.c b/fs/affs.c index e19f878c3..8ebfa4035 100644 --- a/fs/affs.c +++ b/fs/affs.c @@ -149,7 +149,7 @@ grub_affs_read_block (grub_fshelp_node_t node, int fileblock) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_affs_read_file (grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/ext2.c b/fs/ext2.c index 03f6b151f..1aeaa9481 100644 --- a/fs/ext2.c +++ b/fs/ext2.c @@ -267,7 +267,7 @@ grub_ext2_read_block (grub_fshelp_node_t node, int fileblock) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_ext2_read_file (grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/fat.c b/fs/fat.c index ebb2d2435..7f4107735 100644 --- a/fs/fat.c +++ b/fs/fat.c @@ -309,7 +309,7 @@ grub_fat_mount (grub_disk_t disk) static grub_ssize_t grub_fat_read_data (grub_disk_t disk, struct grub_fat_data *data, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), grub_off_t offset, grub_size_t len, char *buf) { diff --git a/fs/fshelp.c b/fs/fshelp.c index a237fae6a..ba97a2fdb 100644 --- a/fs/fshelp.c +++ b/fs/fshelp.c @@ -222,7 +222,7 @@ grub_fshelp_find_file (const char *path, grub_fshelp_node_t rootnode, blocks have a size of LOG2BLOCKSIZE (in log2). */ grub_ssize_t grub_fshelp_read_file (grub_disk_t disk, grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf, int (*get_block) (grub_fshelp_node_t node, int block), diff --git a/fs/hfs.c b/fs/hfs.c index 5c89bd80c..be129b4cd 100644 --- a/fs/hfs.c +++ b/fs/hfs.c @@ -228,7 +228,7 @@ grub_hfs_block (struct grub_hfs_data *data, grub_hfs_datarecord_t dat, POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_hfs_read_file (struct grub_hfs_data *data, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/hfsplus.c b/fs/hfsplus.c index d771ae301..c3e57a4ca 100644 --- a/fs/hfsplus.c +++ b/fs/hfsplus.c @@ -356,7 +356,7 @@ grub_hfsplus_read_block (grub_fshelp_node_t node, int fileblock) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_hfsplus_read_file (grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/jfs.c b/fs/jfs.c index deb460f52..be489b9b2 100644 --- a/fs/jfs.c +++ b/fs/jfs.c @@ -539,7 +539,7 @@ grub_jfs_getent (struct grub_jfs_diropen *diro) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_jfs_read_file (struct grub_jfs_data *data, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/minix.c b/fs/minix.c index 20503e2b0..e78863e27 100644 --- a/fs/minix.c +++ b/fs/minix.c @@ -186,7 +186,7 @@ grub_minix_get_file_block (struct grub_minix_data *data, unsigned int blk) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_minix_read_file (struct grub_minix_data *data, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_disk_addr_t len, char *buf) { diff --git a/fs/sfs.c b/fs/sfs.c index 79de60e7a..a453bc69c 100644 --- a/fs/sfs.c +++ b/fs/sfs.c @@ -258,7 +258,7 @@ grub_sfs_read_block (grub_fshelp_node_t node, int fileblock) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_sfs_read_file (grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/ufs.c b/fs/ufs.c index 477b2799a..ba7bfb03f 100644 --- a/fs/ufs.c +++ b/fs/ufs.c @@ -240,7 +240,7 @@ grub_ufs_get_file_block (struct grub_ufs_data *data, unsigned int blk) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_ufs_read_file (struct grub_ufs_data *data, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/fs/xfs.c b/fs/xfs.c index e7b529368..b3154c7ce 100644 --- a/fs/xfs.c +++ b/fs/xfs.c @@ -236,7 +236,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, int fileblock) POS. Return the amount of read bytes in READ. */ static grub_ssize_t grub_xfs_read_file (grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf) { diff --git a/include/grub/disk.h b/include/grub/disk.h index 6a067bffb..c4fa11e09 100644 --- a/include/grub/disk.h +++ b/include/grub/disk.h @@ -95,7 +95,7 @@ struct grub_disk /* Called when a sector was read. OFFSET is between 0 and the sector size minus 1, and LENGTH is between 0 and the sector size. */ - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length); /* Device-specific data. */ diff --git a/include/grub/file.h b/include/grub/file.h index da269b397..df2e9e470 100644 --- a/include/grub/file.h +++ b/include/grub/file.h @@ -43,7 +43,7 @@ struct grub_file void *data; /* This is called when a sector is read. Used only for a disk device. */ - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length); }; typedef struct grub_file *grub_file_t; diff --git a/include/grub/fshelp.h b/include/grub/fshelp.h index 8c756a525..e25dd16a8 100644 --- a/include/grub/fshelp.h +++ b/include/grub/fshelp.h @@ -63,7 +63,7 @@ EXPORT_FUNC(grub_fshelp_find_file) (const char *path, blocks have a size of LOG2BLOCKSIZE (in log2). */ grub_ssize_t EXPORT_FUNC(grub_fshelp_read_file) (grub_disk_t disk, grub_fshelp_node_t node, - void (*read_hook) (grub_disk_addr_t sector, + void NESTED_FUNC_ATTR (*read_hook) (grub_disk_addr_t sector, unsigned offset, unsigned length), int pos, grub_size_t len, char *buf, diff --git a/util/i386/pc/grub-setup.c b/util/i386/pc/grub-setup.c index f17d5c452..abbea4c06 100644 --- a/util/i386/pc/grub-setup.c +++ b/util/i386/pc/grub-setup.c @@ -109,9 +109,9 @@ setup (const char *prefix, const char *dir, unsigned long first_start = ~0UL; int able_to_embed = 1; - auto void save_first_sector (grub_disk_addr_t sector, unsigned offset, + auto void NESTED_FUNC_ATTR save_first_sector (grub_disk_addr_t sector, unsigned offset, unsigned length); - auto void save_blocklists (grub_disk_addr_t sector, unsigned offset, + auto void NESTED_FUNC_ATTR save_blocklists (grub_disk_addr_t sector, unsigned offset, unsigned length); auto int find_first_partition_start (grub_disk_t disk, @@ -130,7 +130,7 @@ setup (const char *prefix, const char *dir, return 0; } - void save_first_sector (grub_disk_addr_t sector, unsigned offset, + void NESTED_FUNC_ATTR save_first_sector (grub_disk_addr_t sector, unsigned offset, unsigned length) { grub_util_info ("the first sector is <%llu,%u,%u>", @@ -142,7 +142,7 @@ setup (const char *prefix, const char *dir, first_sector = sector; } - void save_blocklists (grub_disk_addr_t sector, unsigned offset, + void NESTED_FUNC_ATTR save_blocklists (grub_disk_addr_t sector, unsigned offset, unsigned length) { struct boot_blocklist *prev = block + 1;