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

* commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
	(grub_boot_fini) [GRUB_UTIL]: Likewise.
	(GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
	(GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.

	* fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
	(grub_hfs_iterate_dir): Make the function static.  Add prototypes
	for `node_found' and `it_dir'.
	(grub_hfs_dir): Add prototype for `dir_hook'.

	* fs/minix.c (grub_minix_get_file_block): Add prototype for
	`grub_get_indir'.  Rename `indir' in two blocks to `indir16'
	and `indir32' to silence a gcc warning.

	* include/grub/fs.h (grub_hfs_init): New prototype.
	(grub_hfs_fini): Likewise.
This commit is contained in:
marco_g 2004-08-24 20:32:47 +00:00
parent 97543f08fc
commit 94bc45af05
5 changed files with 43 additions and 10 deletions

View file

@ -523,6 +523,8 @@ grub_hfs_find_node (struct grub_hfs_data *data, char *key,
int found = -1;
int isleaf = 0;
auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
{
int cmp = 1;
@ -576,7 +578,7 @@ grub_hfs_find_node (struct grub_hfs_data *data, char *key,
/* Iterate over the directory with the id DIR. The tree is searched
starting with the node ROOT_IDX. For every entry in this directory
call HOOK. */
grub_err_t
static grub_err_t
grub_hfs_iterate_dir (struct grub_hfs_data *data, grub_uint32_t root_idx,
unsigned int dir, int (*hook) (struct grub_hfs_record *))
{
@ -586,9 +588,13 @@ grub_hfs_iterate_dir (struct grub_hfs_data *data, grub_uint32_t root_idx,
/* The lowest key possible with DIR as root directory. */
struct grub_hfs_catalog_key key = {0, grub_cpu_to_be32 (dir), 0, ""};
auto int node_found (struct grub_hfs_node *, struct grub_hfs_record *);
auto int it_dir (struct grub_hfs_node * __attribute ((unused)),
struct grub_hfs_record *);
int node_found (struct grub_hfs_node *hnd, struct grub_hfs_record *rec)
{
struct grub_hfs_catalog_key *ckey = rec->key;
@ -723,6 +729,8 @@ grub_hfs_dir (grub_device_t device, const char *path,
{
int inode;
auto int dir_hook (struct grub_hfs_record *rec);
int dir_hook (struct grub_hfs_record *rec)
{
char fname[32] = { 0 };