|
|
0a122b |
From 3090a6d3f085dea8f7f6539bf12709cd79d57cb4 Mon Sep 17 00:00:00 2001
|
|
|
0a122b |
Message-Id: <3090a6d3f085dea8f7f6539bf12709cd79d57cb4.1387298827.git.minovotn@redhat.com>
|
|
|
0a122b |
In-Reply-To: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
|
|
|
0a122b |
References: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
|
|
|
0a122b |
From: "Michael S. Tsirkin" <mst@redhat.com>
|
|
|
0a122b |
Date: Tue, 17 Dec 2013 15:18:28 +0100
|
|
|
0a122b |
Subject: [PATCH 36/56] loader: use file path size from fw_cfg.h
|
|
|
0a122b |
|
|
|
0a122b |
RH-Author: Michael S. Tsirkin <mst@redhat.com>
|
|
|
0a122b |
Message-id: <1387293161-4085-37-git-send-email-mst@redhat.com>
|
|
|
0a122b |
Patchwork-id: 56342
|
|
|
0a122b |
O-Subject: [PATCH qemu-kvm RHEL7.0 v2 36/57] loader: use file path size from fw_cfg.h
|
|
|
0a122b |
Bugzilla: 1034876
|
|
|
0a122b |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
0a122b |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
0a122b |
|
|
|
0a122b |
Avoid a bit of code duplication, make
|
|
|
0a122b |
max file path constant reusable.
|
|
|
0a122b |
|
|
|
0a122b |
Suggested-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
0a122b |
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
0a122b |
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
0a122b |
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
0a122b |
Tested-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
0a122b |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
0a122b |
(cherry picked from commit 35c12e60c840bc4840cbbe3f6ca514a53b2e36bc)
|
|
|
0a122b |
---
|
|
|
0a122b |
include/hw/nvram/fw_cfg.h | 4 +++-
|
|
|
0a122b |
hw/core/loader.c | 2 +-
|
|
|
0a122b |
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
Signed-off-by: Michal Novotny <minovotn@redhat.com>
|
|
|
0a122b |
---
|
|
|
0a122b |
hw/core/loader.c | 2 +-
|
|
|
0a122b |
include/hw/nvram/fw_cfg.h | 4 +++-
|
|
|
0a122b |
2 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
0a122b |
|
|
|
0a122b |
diff --git a/hw/core/loader.c b/hw/core/loader.c
|
|
|
0a122b |
index 2bfff48..ab4c7bd 100644
|
|
|
0a122b |
--- a/hw/core/loader.c
|
|
|
0a122b |
+++ b/hw/core/loader.c
|
|
|
0a122b |
@@ -629,7 +629,7 @@ int rom_add_file(const char *file, const char *fw_dir,
|
|
|
0a122b |
rom_insert(rom);
|
|
|
0a122b |
if (rom->fw_file && fw_cfg) {
|
|
|
0a122b |
const char *basename;
|
|
|
0a122b |
- char fw_file_name[56];
|
|
|
0a122b |
+ char fw_file_name[FW_CFG_MAX_FILE_PATH];
|
|
|
0a122b |
void *data;
|
|
|
0a122b |
|
|
|
0a122b |
basename = strrchr(rom->fw_file, '/');
|
|
|
0a122b |
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
|
|
|
0a122b |
index 2ab0fc2..72b1549 100644
|
|
|
0a122b |
--- a/include/hw/nvram/fw_cfg.h
|
|
|
0a122b |
+++ b/include/hw/nvram/fw_cfg.h
|
|
|
0a122b |
@@ -46,12 +46,14 @@
|
|
|
0a122b |
|
|
|
0a122b |
#define FW_CFG_INVALID 0xffff
|
|
|
0a122b |
|
|
|
0a122b |
+#define FW_CFG_MAX_FILE_PATH 56
|
|
|
0a122b |
+
|
|
|
0a122b |
#ifndef NO_QEMU_PROTOS
|
|
|
0a122b |
typedef struct FWCfgFile {
|
|
|
0a122b |
uint32_t size; /* file size */
|
|
|
0a122b |
uint16_t select; /* write this to 0x510 to read it */
|
|
|
0a122b |
uint16_t reserved;
|
|
|
0a122b |
- char name[56];
|
|
|
0a122b |
+ char name[FW_CFG_MAX_FILE_PATH];
|
|
|
0a122b |
} FWCfgFile;
|
|
|
0a122b |
|
|
|
0a122b |
typedef struct FWCfgFiles {
|
|
|
0a122b |
--
|
|
|
0a122b |
1.7.11.7
|
|
|
0a122b |
|