2007-08-02 Bean <bean123ch@gmail.com>
* 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.
This commit is contained in:
parent
0a203f83ff
commit
9959f7dbb5
17 changed files with 59 additions and 22 deletions
37
ChangeLog
37
ChangeLog
|
@ -1,3 +1,40 @@
|
|||
2007-08-02 Bean <bean123ch@gmail.com>
|
||||
|
||||
* 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 <marco@gnu.org>
|
||||
|
||||
* conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
2
fs/fat.c
2
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)
|
||||
{
|
||||
|
|
|
@ -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),
|
||||
|
|
2
fs/hfs.c
2
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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
2
fs/jfs.c
2
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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
2
fs/sfs.c
2
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)
|
||||
{
|
||||
|
|
2
fs/ufs.c
2
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)
|
||||
{
|
||||
|
|
2
fs/xfs.c
2
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)
|
||||
{
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue