mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 09:39:58 +00:00
Fix compiler warnings when building grub-ieee1275 for i386.
This commit is contained in:
parent
799796947c
commit
9c68bb670d
30
debian/patches/olpc_prefix_hack.patch
vendored
30
debian/patches/olpc_prefix_hack.patch
vendored
@ -13,7 +13,7 @@ Index: b/grub-core/kern/ieee1275/init.c
|
||||
/* Translate an OF filesystem path (separated by backslashes), into a GRUB
|
||||
path (separated by forward slashes). */
|
||||
static void
|
||||
@@ -75,6 +76,7 @@
|
||||
@@ -75,10 +76,19 @@
|
||||
backslash = grub_strchr (filepath, '\\');
|
||||
}
|
||||
}
|
||||
@ -21,27 +21,23 @@ Index: b/grub-core/kern/ieee1275/init.c
|
||||
|
||||
void (*grub_ieee1275_net_config) (const char *dev,
|
||||
char **device,
|
||||
@@ -82,10 +84,15 @@
|
||||
char **path);
|
||||
+#ifdef __i386__
|
||||
+void
|
||||
+grub_machine_get_bootlocation (char **device __attribute__ ((unused)),
|
||||
+ char **path __attribute__ ((unused)))
|
||||
+{
|
||||
+ grub_env_set ("prefix", "(sd,1)/");
|
||||
+}
|
||||
+#else
|
||||
void
|
||||
grub_machine_get_bootlocation (char **device, char **path)
|
||||
{
|
||||
+#ifndef __i386__
|
||||
char bootpath[64]; /* XXX check length */
|
||||
char *filename;
|
||||
char *type;
|
||||
+#endif
|
||||
|
||||
+#ifdef __i386__
|
||||
+ grub_env_set ("prefix", "(sd,1)/");
|
||||
+#else
|
||||
if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
|
||||
sizeof (bootpath), 0))
|
||||
{
|
||||
@@ -132,6 +139,7 @@
|
||||
*path = filename;
|
||||
@@ -133,6 +143,7 @@
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Claim some available memory in the first /memory node. */
|
||||
#ifdef __sparc__
|
||||
|
@ -81,18 +81,21 @@ grub_translate_ieee1275_path (char *filepath)
|
||||
void (*grub_ieee1275_net_config) (const char *dev,
|
||||
char **device,
|
||||
char **path);
|
||||
#ifdef __i386__
|
||||
void
|
||||
grub_machine_get_bootlocation (char **device __attribute__ ((unused)),
|
||||
char **path __attribute__ ((unused)))
|
||||
{
|
||||
grub_env_set ("prefix", "(sd,1)/");
|
||||
}
|
||||
#else
|
||||
void
|
||||
grub_machine_get_bootlocation (char **device, char **path)
|
||||
{
|
||||
#ifndef __i386__
|
||||
char bootpath[64]; /* XXX check length */
|
||||
char *filename;
|
||||
char *type;
|
||||
#endif
|
||||
|
||||
#ifdef __i386__
|
||||
grub_env_set ("prefix", "(sd,1)/");
|
||||
#else
|
||||
if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
|
||||
sizeof (bootpath), 0))
|
||||
{
|
||||
@ -139,8 +142,8 @@ grub_machine_get_bootlocation (char **device, char **path)
|
||||
*path = filename;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Claim some available memory in the first /memory node. */
|
||||
#ifdef __sparc__
|
||||
|
Loading…
Reference in New Issue
Block a user