]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Add arm64-efi recognition to grub-file.
authorVladimir Serbinenko <phcoder@gmail.com>
Mon, 23 Dec 2013 04:33:44 +0000 (05:33 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Mon, 23 Dec 2013 04:33:44 +0000 (05:33 +0100)
ChangeLog
grub-core/commands/file.c

index 7ff951ac2a14eb59d9b87907191d0fbd0e53d6a8..ab336faf579828c649376613ed8e3ac2fb7e6308 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-23  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Add arm64-efi recognition to grub-file.
+
 2013-12-23  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Fix ia64-efi recognition in grub-file.
index be8ed528dec559e3b4f78bceca0ce06666d6a17f..2723609c017e57bb5dfa583d3be70a38b53d5c06 100644 (file)
@@ -82,6 +82,8 @@ static const struct grub_arg_option options[] = {
    N_("Check if FILE is x86_64 EFI file"), 0, 0},
   {"is-ia64-efi", 0, 0,
    N_("Check if FILE is IA64 EFI file"), 0, 0},
+  {"is-arm64-efi", 0, 0,
+   N_("Check if FILE is ARM64 EFI file"), 0, 0},
   {"is-arm-efi", 0, 0,
    N_("Check if FILE is ARM EFI file"), 0, 0},
   {"is-hibernated-hiberfil", 0, 0,
@@ -121,6 +123,7 @@ enum
   IS_32_EFI,
   IS_64_EFI,
   IS_IA_EFI,
+  IS_ARM64_EFI,
   IS_ARM_EFI,
   IS_HIBERNATED,
   IS_XNU64,
@@ -546,6 +549,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
     case IS_32_EFI:
     case IS_64_EFI:
     case IS_IA_EFI:
+    case IS_ARM64_EFI:
     case IS_ARM_EFI:
       {
        char signature[4];
@@ -584,11 +588,15 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
            && coff_head.machine !=
            grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_IA64))
          break;
+       if (type == IS_ARM64_EFI
+           && coff_head.machine !=
+           grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_ARM64))
+         break;
        if (type == IS_ARM_EFI
            && coff_head.machine !=
            grub_cpu_to_le16_compile_time (GRUB_PE32_MACHINE_ARMTHUMB_MIXED))
          break;
-       if (type == IS_IA_EFI || type == IS_64_EFI)
+       if (type == IS_IA_EFI || type == IS_64_EFI || type == IS_ARM64_EFI)
          {
            struct grub_pe64_optional_header o64;
            if (grub_file_read (file, &o64, sizeof (o64)) != sizeof (o64))