Blob Blame History Raw
From 0e2785dda84709d9be80be85e4d551b1d8a26616 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 18 Aug 2016 16:13:12 +0100
Subject: [PATCH] aarch64: uefi: Fix the build on aarch64.

Fixes commit 0c396650b0018dc3fcd7ca809202ad46ae2c327d.

(cherry picked from commit c711b517094375d4c321af4800e747b955643133)
---
 src/appliance.c                 | 11 ++++++-----
 src/guestfs-internal-frontend.h |  6 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/appliance.c b/src/appliance.c
index a3af164..19a697b 100644
--- a/src/appliance.c
+++ b/src/appliance.c
@@ -435,10 +435,11 @@ guestfs_int_get_uefi (guestfs_h *g, char **code, char **vars, int *flags)
 #ifdef __aarch64__
   size_t i;
 
-  for (i = 0; guestfs_int_aavmf_firmware[i].code != NULL; ++i) {
-    const char *codefile = guestfs_int_aavmf_firmware[i].code;
-    const char *code_debug_file = guestfs_int_aavmf_firmware[i].code_debug;
-    const char *varsfile = guestfs_int_aavmf_firmware[i].vars;
+  for (i = 0; guestfs_int_uefi_aarch64_firmware[i].code != NULL; ++i) {
+    const char *codefile = guestfs_int_uefi_aarch64_firmware[i].code;
+    const char *code_debug_file =
+      guestfs_int_uefi_aarch64_firmware[i].code_debug;
+    const char *varsfile = guestfs_int_uefi_aarch64_firmware[i].vars;
 
     if (access (codefile, R_OK) == 0 && access (varsfile, R_OK) == 0) {
       CLEANUP_CMD_CLOSE struct command *copycmd = guestfs_int_new_command (g);
@@ -468,7 +469,7 @@ guestfs_int_get_uefi (guestfs_h *g, char **code, char **vars, int *flags)
       /* Caller frees. */
       *code = safe_strdup (g, codefile);
       *vars = varst;
-      *flags = guestfs_int_aavmf_firmware[i].flags;
+      *flags = guestfs_int_uefi_aarch64_firmware[i].flags;
       return 0;
     }
   }
diff --git a/src/guestfs-internal-frontend.h b/src/guestfs-internal-frontend.h
index ebf8063..868122d 100644
--- a/src/guestfs-internal-frontend.h
+++ b/src/guestfs-internal-frontend.h
@@ -126,9 +126,9 @@ struct uefi_firmware {
   int flags;                    /* various flags, see below */
 #define UEFI_FLAG_SECURE_BOOT_REQUIRED 1 /* secure boot (see RHBZ#1367615) */
 };
-extern struct uefi_firmware guestfs_int_ovmf_i386_firmware[];
-extern struct uefi_firmware guestfs_int_ovmf_x86_64_firmware[];
-extern struct uefi_firmware guestfs_int_aavmf_firmware[];
+extern struct uefi_firmware guestfs_int_uefi_i386_firmware[];
+extern struct uefi_firmware guestfs_int_uefi_x86_64_firmware[];
+extern struct uefi_firmware guestfs_int_uefi_aarch64_firmware[];
 
 /* These functions are used internally by the CLEANUP_* macros.
  * Don't call them directly.
-- 
1.8.3.1