From: Vladimir Serbinenko Date: Sat, 16 Nov 2013 23:54:40 +0000 (+0100) Subject: * util/grub-install-common.c (platforms): Fix the order of entries and X-Git-Tag: grub-2.02-beta1~303 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d4d55b29e0ad7df8447f3ffebb15fa35d2e6a04b;p=thirdparty%2Fgrub.git * util/grub-install-common.c (platforms): Fix the order of entries and remove useless field val. --- diff --git a/ChangeLog b/ChangeLog index 0814b2b38..3f891a84e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-17 Vladimir Serbinenko + + * util/grub-install-common.c (platforms): Fix the order of entries and + remove useless field val. + 2013-11-16 Vladimir Serbinenko * util/grub-install.c: Add new option --no-bootsector to skip diff --git a/util/grub-install-common.c b/util/grub-install-common.c index 75a315d06..c60d2df4f 100644 --- a/util/grub-install-common.c +++ b/util/grub-install-common.c @@ -585,28 +585,27 @@ copy_locales (const char *dstd) static struct { - enum grub_install_plat val; const char *cpu; const char *platform; -} platforms[] = +} platforms[GRUB_INSTALL_PLATFORM_MAX] = { - { GRUB_INSTALL_PLATFORM_I386_PC, "i386", "pc" }, - { GRUB_INSTALL_PLATFORM_I386_EFI, "i386", "efi" }, - { GRUB_INSTALL_PLATFORM_I386_QEMU, "i386", "qemu" }, - { GRUB_INSTALL_PLATFORM_I386_COREBOOT, "i386", "coreboot" }, - { GRUB_INSTALL_PLATFORM_I386_MULTIBOOT, "i386", "multiboot" }, - { GRUB_INSTALL_PLATFORM_I386_IEEE1275, "i386", "ieee1275" }, - { GRUB_INSTALL_PLATFORM_X86_64_EFI, "x86_64", "efi" }, - { GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON, "mipsel", "loongson" }, - { GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS, "mipsel", "qemu_mips" }, - { GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS, "mips", "qemu_mips" }, - { GRUB_INSTALL_PLATFORM_MIPSEL_ARC, "mipsel", "arc" }, - { GRUB_INSTALL_PLATFORM_MIPS_ARC, "mips", "arc" }, - { GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275, "sparc64", "ieee1275" }, - { GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275, "powerpc", "ieee1275" }, - { GRUB_INSTALL_PLATFORM_IA64_EFI, "ia64", "efi" }, - { GRUB_INSTALL_PLATFORM_ARM_EFI, "arm", "efi" }, - { GRUB_INSTALL_PLATFORM_ARM_UBOOT, "arm", "uboot" }, + [GRUB_INSTALL_PLATFORM_I386_PC] = { "i386", "pc" }, + [GRUB_INSTALL_PLATFORM_I386_EFI] = { "i386", "efi" }, + [GRUB_INSTALL_PLATFORM_I386_QEMU] = { "i386", "qemu" }, + [GRUB_INSTALL_PLATFORM_I386_COREBOOT] = { "i386", "coreboot" }, + [GRUB_INSTALL_PLATFORM_I386_MULTIBOOT] = { "i386", "multiboot" }, + [GRUB_INSTALL_PLATFORM_I386_IEEE1275] = { "i386", "ieee1275" }, + [GRUB_INSTALL_PLATFORM_X86_64_EFI] = { "x86_64", "efi" }, + [GRUB_INSTALL_PLATFORM_MIPSEL_LOONGSON] = { "mipsel", "loongson" }, + [GRUB_INSTALL_PLATFORM_MIPSEL_QEMU_MIPS] = { "mipsel", "qemu_mips" }, + [GRUB_INSTALL_PLATFORM_MIPS_QEMU_MIPS] = { "mips", "qemu_mips" }, + [GRUB_INSTALL_PLATFORM_MIPSEL_ARC] = { "mipsel", "arc" }, + [GRUB_INSTALL_PLATFORM_MIPS_ARC] = { "mips", "arc" }, + [GRUB_INSTALL_PLATFORM_SPARC64_IEEE1275] = { "sparc64", "ieee1275" }, + [GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275] = { "powerpc", "ieee1275" }, + [GRUB_INSTALL_PLATFORM_IA64_EFI] = { "ia64", "efi" }, + [GRUB_INSTALL_PLATFORM_ARM_EFI] = { "arm", "efi" }, + [GRUB_INSTALL_PLATFORM_ARM_UBOOT] = { "arm", "uboot" }, }; char * @@ -825,7 +824,7 @@ grub_install_get_target (const char *src) && strcmp (platforms[i].platform, pl) == 0) { free (fn); - return platforms[i].val; + return i; } grub_util_error (_("Unknown platform `%s-%s'"), c, pl); }