2006-04-26 Yoshinori K. Okuji <okuji@enbug.org>
* util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments explicitly to suppress gcc's warnings. * fs/fat.c (grub_fat_find_dir): Likewise. (grub_fat_label): Likewise. * fs/xfs.c (grub_xfs_read_inode): Likewise. (grub_xfs_mount): Likewise. (grub_xfs_label): Likewise. * fs/affs.c (grub_affs_mount): Likewise. (grub_affs_label): Likewise. (grub_affs_iterate_dir): Likewise. * fs/sfs.c (grub_sfs_mount): Likewise. (grub_sfs_iterate_dir): Likewise. * fs/ufs.c (grub_ufs_lookup_symlink): Likewise. * fs/hfs.c (grub_hfs_mount): Likewise. (grub_hfs_cmp_catkeys): Likewise. (grub_hfs_find_dir): Likewise. (grub_hfs_dir): Likewise. (grub_hfs_label): Likewise. * fs/jfs.c (grub_jfs_mount): Likewise. (grub_jfs_opendir): Likewise. (grub_jfs_getent): Likewise. (grub_jfs_lookup_symlink): Likewise. (grub_jfs_label): Likewise. * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise. (grub_hfsplus_iterate_dir): Likewise. (grub_hfsplus_btree_iterate_node): Made static. * util/grub-emu.c (prefix): New variable. (grub_machine_set_prefix): New function. (main): Do not set the environment variable "prefix" here. Only set PREFIX, which is used later by grub_machine_set_prefix. * include/grub/video.h: Do not include grub/symbol.h. (grub_video_register): Not exported. This symbol is not defined in the kernel. (grub_video_unregister): Likewise. (grub_video_iterate): Likewise. (grub_video_setup): Likewise. (grub_video_restore): Likewise. (grub_video_get_info): Likewise. (grub_video_get_blit_format): Likewise. (grub_video_set_palette): Likewise. (grub_video_get_palette): Likewise. (grub_video_set_viewport): Likewise. (grub_video_get_viewport): Likewise. (grub_video_map_color): Likewise. (grub_video_map_rgb): Likewise. (grub_video_map_rgba): Likewise. (grub_video_fill_rect): Likewise. (grub_video_blit_glyph): Likewise. (grub_video_blit_bitmap): Likewise. (grub_video_blit_render_target): Likewise. (grub_video_scroll): Likewise. (grub_video_swap_buffers): Likewise. (grub_video_create_render_target): Likewise. (grub_video_delete_render_target): Likewise. (grub_video_set_active_render_target): Likewise. * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC): Undefined. [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise. * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh. (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh instead of $(srcdir)/genkernsyms.sh. * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and genkernsyms.sh. * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and genkernsyms.sh. (gensymlist.sh): New target. (genkernsyms.sh): Likewise. * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added genkernsyms.sh.in and gensymlist.sh.in. * genkernsyms.sh: Removed. * gensymlist.sh: Likewise. * genkernsyms.sh.in: New file. * gensymlist.sh.in: Likewise.
This commit is contained in:
parent
1885bb2790
commit
7b455f4dd3
28 changed files with 308 additions and 163 deletions
|
@ -182,7 +182,7 @@ grub_affs_mount (grub_disk_t disk)
|
|||
goto fail;
|
||||
|
||||
/* Make sure this is an affs filesystem. */
|
||||
if (grub_strncmp (data->bblock.type, "DOS", 3))
|
||||
if (grub_strncmp ((char *) (data->bblock.type), "DOS", 3))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an affs filesystem");
|
||||
goto fail;
|
||||
|
@ -364,7 +364,7 @@ grub_affs_iterate_dir (grub_fshelp_node_t dir,
|
|||
else
|
||||
type = GRUB_FSHELP_UNKNOWN;
|
||||
|
||||
if (grub_affs_create_node (file.name, next,
|
||||
if (grub_affs_create_node ((char *) (file.name), next,
|
||||
grub_be_to_cpu32 (file.size), type))
|
||||
return 1;
|
||||
|
||||
|
@ -527,7 +527,7 @@ grub_affs_label (grub_device_t device, char **label)
|
|||
if (grub_errno)
|
||||
return 0;
|
||||
|
||||
*label = grub_strndup (file.name, file.namelen);
|
||||
*label = grub_strndup ((char *) (file.name), file.namelen);
|
||||
}
|
||||
else
|
||||
*label = 0;
|
||||
|
|
5
fs/fat.c
5
fs/fat.c
|
@ -557,7 +557,8 @@ grub_fat_find_dir (grub_disk_t disk, struct grub_fat_data *data,
|
|||
for (u = 0; u < slots * 13; u++)
|
||||
unibuf[u] = grub_le_to_cpu16 (unibuf[u]);
|
||||
|
||||
*grub_utf16_to_utf8 (filename, unibuf, slots * 13) = '\0';
|
||||
*grub_utf16_to_utf8 ((grub_uint8_t *) filename, unibuf,
|
||||
slots * 13) = '\0';
|
||||
|
||||
if (*dirname == '\0' && call_hook)
|
||||
{
|
||||
|
@ -779,7 +780,7 @@ grub_fat_label (grub_device_t device, char **label)
|
|||
|
||||
if (dir.attr == GRUB_FAT_ATTR_VOLUME_ID)
|
||||
{
|
||||
*label = grub_strndup (dir.name, 11);
|
||||
*label = grub_strndup ((char *) dir.name, 11);
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
}
|
||||
|
|
15
fs/hfs.c
15
fs/hfs.c
|
@ -357,7 +357,7 @@ grub_hfs_mount (grub_disk_t disk)
|
|||
volume name. */
|
||||
key.parent_dir = grub_cpu_to_be32 (1);
|
||||
key.strlen = data->sblock.volname[0];
|
||||
grub_strcpy (key.str, data->sblock.volname + 1);
|
||||
grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1));
|
||||
|
||||
if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||
0, (char *) &dir, sizeof (dir)) == 0)
|
||||
|
@ -393,7 +393,7 @@ grub_hfs_cmp_catkeys (struct grub_hfs_catalog_key *k1,
|
|||
if (cmp != 0)
|
||||
return cmp;
|
||||
|
||||
cmp = grub_strncasecmp (k1->str, k2->str, k1->strlen);
|
||||
cmp = grub_strncasecmp ((char *) (k1->str), (char *) (k2->str), k1->strlen);
|
||||
|
||||
/* This is required because the compared strings are not of equal
|
||||
length. */
|
||||
|
@ -673,11 +673,11 @@ grub_hfs_find_dir (struct grub_hfs_data *data, const char *path,
|
|||
|
||||
key.parent_dir = grub_cpu_to_be32 (inode);
|
||||
key.strlen = grub_strlen (path);
|
||||
grub_strcpy (key.str, path);
|
||||
grub_strcpy ((char *) (key.str), path);
|
||||
|
||||
/* Lookup this node. */
|
||||
if (!grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||
0, (char *) &frec, sizeof (frec)))
|
||||
if (! grub_hfs_find_node (data, (char *) &key, data->cat_root,
|
||||
0, (char *) &frec, sizeof (frec)))
|
||||
{
|
||||
grub_error (GRUB_ERR_FILE_NOT_FOUND, "file not found");
|
||||
goto fail;
|
||||
|
@ -717,7 +717,7 @@ grub_hfs_dir (grub_device_t device, const char *path,
|
|||
char *filetype = rec->data;
|
||||
struct grub_hfs_catalog_key *ckey = rec->key;
|
||||
|
||||
grub_strncpy (fname, ckey->str, ckey->strlen);
|
||||
grub_strncpy (fname, (char *) (ckey->str), ckey->strlen);
|
||||
|
||||
if (*filetype == GRUB_HFS_FILETYPE_DIR)
|
||||
return hook (fname, 1);
|
||||
|
@ -834,7 +834,8 @@ grub_hfs_label (grub_device_t device, char **label)
|
|||
data = grub_hfs_mount (device->disk);
|
||||
|
||||
if (data)
|
||||
*label = grub_strndup (data->sblock.volname + 1, *data->sblock.volname);
|
||||
*label = grub_strndup ((char *) (data->sblock.volname + 1),
|
||||
*data->sblock.volname);
|
||||
else
|
||||
*label = 0;
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ grub_hfsplus_cmp_catkey (struct grub_hfsplus_key *keya,
|
|||
|
||||
filename = grub_malloc (grub_be_to_cpu16 (catkey_a->namelen) + 1);
|
||||
|
||||
if (! grub_utf16_to_utf8 (filename, catkey_a->name,
|
||||
if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey_a->name,
|
||||
grub_be_to_cpu16 (catkey_a->namelen)))
|
||||
return -1; /* XXX: This error never occurs, but in case it happens
|
||||
just skip this entry. */
|
||||
|
@ -563,7 +563,7 @@ grub_hfsplus_read_symlink (grub_fshelp_node_t node)
|
|||
return symlink;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
grub_hfsplus_btree_iterate_node (struct grub_hfsplus_btree *btree,
|
||||
struct grub_hfsplus_btnode *first_node,
|
||||
int first_rec,
|
||||
|
@ -723,7 +723,7 @@ grub_hfsplus_iterate_dir (grub_fshelp_node_t dir,
|
|||
for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
|
||||
catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
|
||||
|
||||
if (! grub_utf16_to_utf8 (filename, catkey->name,
|
||||
if (! grub_utf16_to_utf8 ((grub_uint8_t *) filename, catkey->name,
|
||||
grub_be_to_cpu16 (catkey->namelen)))
|
||||
{
|
||||
grub_free (filename);
|
||||
|
|
10
fs/jfs.c
10
fs/jfs.c
|
@ -342,7 +342,7 @@ grub_jfs_mount (grub_disk_t disk)
|
|||
sizeof (struct grub_jfs_sblock), (char *) &data->sblock))
|
||||
goto fail;
|
||||
|
||||
if (grub_strncmp (data->sblock.magic, "JFS1", 4))
|
||||
if (grub_strncmp ((char *) (data->sblock.magic), "JFS1", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a jfs filesystem");
|
||||
goto fail;
|
||||
|
@ -398,7 +398,7 @@ grub_jfs_opendir (struct grub_jfs_data *data, struct grub_jfs_inode *inode)
|
|||
{
|
||||
diro->leaf = inode->dir.dirents;
|
||||
diro->next_leaf = (struct grub_jfs_leaf_next_dirent *) de;
|
||||
diro->sorted = inode->dir.header.sorted;
|
||||
diro->sorted = (char *) (inode->dir.header.sorted);
|
||||
diro->count = inode->dir.header.count;
|
||||
diro->dirpage = 0;
|
||||
|
||||
|
@ -530,7 +530,7 @@ grub_jfs_getent (struct grub_jfs_diropen *diro)
|
|||
diro->index++;
|
||||
|
||||
/* Convert the temporary UTF16 filename to UTF8. */
|
||||
*grub_utf16_to_utf8 (diro->name, filename, strpos) = '\0';
|
||||
*grub_utf16_to_utf8 ((grub_uint8_t *) (diro->name), filename, strpos) = '\0';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ grub_jfs_lookup_symlink (struct grub_jfs_data *data, int ino)
|
|||
return grub_error (GRUB_ERR_SYMLINK_LOOP, "too deep nesting of symlinks");
|
||||
|
||||
if (size <= 128)
|
||||
grub_strncpy (symlink, data->currinode.symlink.path, 128);
|
||||
grub_strncpy (symlink, (char *) (data->currinode.symlink.path), 128);
|
||||
else if (grub_jfs_read_file (data, 0, 0, size, symlink) < 0)
|
||||
return grub_errno;
|
||||
|
||||
|
@ -851,7 +851,7 @@ grub_jfs_label (grub_device_t device, char **label)
|
|||
data = grub_jfs_mount (device->disk);
|
||||
|
||||
if (data)
|
||||
*label = grub_strndup (data->sblock.volname, 11);
|
||||
*label = grub_strndup ((char *) (data->sblock.volname), 11);
|
||||
else
|
||||
*label = 0;
|
||||
|
||||
|
|
8
fs/sfs.c
8
fs/sfs.c
|
@ -288,7 +288,7 @@ grub_sfs_mount (grub_disk_t disk)
|
|||
goto fail;
|
||||
|
||||
/* Make sure this is a sfs filesystem. */
|
||||
if (grub_strncmp (data->rblock.header.magic, "SFS", 4))
|
||||
if (grub_strncmp ((char *) (data->rblock.header.magic), "SFS", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a sfs filesystem");
|
||||
goto fail;
|
||||
|
@ -296,7 +296,7 @@ grub_sfs_mount (grub_disk_t disk)
|
|||
|
||||
data->blocksize = grub_be_to_cpu32 (data->rblock.blocksize);
|
||||
rootobjc_data = grub_malloc (data->blocksize);
|
||||
if (!rootobjc_data)
|
||||
if (! rootobjc_data)
|
||||
goto fail;
|
||||
|
||||
/* Read the root object container. */
|
||||
|
@ -312,7 +312,7 @@ grub_sfs_mount (grub_disk_t disk)
|
|||
data->diropen.block = blk;
|
||||
data->diropen.data = data;
|
||||
data->disk = disk;
|
||||
data->label = grub_strdup (rootobjc->objects[0].filename);
|
||||
data->label = grub_strdup ((char *) (rootobjc->objects[0].filename));
|
||||
|
||||
return data;
|
||||
|
||||
|
@ -403,7 +403,7 @@ grub_sfs_iterate_dir (grub_fshelp_node_t dir,
|
|||
{
|
||||
struct grub_sfs_obj *obj;
|
||||
obj = (struct grub_sfs_obj *) ((char *) objc + pos);
|
||||
char *filename = obj->filename;
|
||||
char *filename = (char *) (obj->filename);
|
||||
int len;
|
||||
enum grub_fshelp_filetype type;
|
||||
unsigned int block;
|
||||
|
|
2
fs/ufs.c
2
fs/ufs.c
|
@ -363,7 +363,7 @@ grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
|
|||
|
||||
if (INODE_SIZE (data) < (GRUB_UFS_DIRBLKS + GRUB_UFS_INDIRBLKS
|
||||
* INODE_BLKSZ (data)))
|
||||
grub_strcpy (symlink, INODE (data, symlink));
|
||||
grub_strcpy (symlink, (char *) INODE (data, symlink));
|
||||
else
|
||||
{
|
||||
grub_disk_read (data->disk,
|
||||
|
|
6
fs/xfs.c
6
fs/xfs.c
|
@ -191,7 +191,7 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
|
|||
sizeof (struct grub_xfs_inode), (char *) inode))
|
||||
return grub_errno;
|
||||
|
||||
if (grub_strncmp (inode->magic, "IN", 2))
|
||||
if (grub_strncmp ((char *) inode->magic, "IN", 2))
|
||||
return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode.\n");
|
||||
|
||||
return 0;
|
||||
|
@ -494,7 +494,7 @@ grub_xfs_mount (grub_disk_t disk)
|
|||
sizeof (struct grub_xfs_sblock), (char *) &data->sblock))
|
||||
goto fail;
|
||||
|
||||
if (grub_strncmp (data->sblock.magic, "XFSB", 4))
|
||||
if (grub_strncmp ((char *) (data->sblock.magic), "XFSB", 4))
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a xfs filesystem");
|
||||
goto fail;
|
||||
|
@ -663,7 +663,7 @@ grub_xfs_label (grub_device_t device, char **label)
|
|||
|
||||
data = grub_xfs_mount (disk);
|
||||
if (data)
|
||||
*label = grub_strndup (data->sblock.label, 12);
|
||||
*label = grub_strndup ((char *) (data->sblock.label), 12);
|
||||
else
|
||||
*label = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue