aboutsummaryrefslogtreecommitdiff
path: root/include/hw/nvram/fw_cfg.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-07-24 18:56:05 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-10-14 17:48:52 +0300
commit35c12e60c840bc4840cbbe3f6ca514a53b2e36bc (patch)
treebdfe8e3025b5f32f07e5564f9875625806b77234 /include/hw/nvram/fw_cfg.h
parent544d2bfa84c43f9d4c70ca2202a6113d686b8999 (diff)
loader: use file path size from fw_cfg.h
Avoid a bit of code duplication, make max file path constant reusable. Suggested-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/nvram/fw_cfg.h')
-rw-r--r--include/hw/nvram/fw_cfg.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 2ab0fc2950..72b1549dc4 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -46,12 +46,14 @@
#define FW_CFG_INVALID 0xffff
+#define FW_CFG_MAX_FILE_PATH 56
+
#ifndef NO_QEMU_PROTOS
typedef struct FWCfgFile {
uint32_t size; /* file size */
uint16_t select; /* write this to 0x510 to read it */
uint16_t reserved;
- char name[56];
+ char name[FW_CFG_MAX_FILE_PATH];
} FWCfgFile;
typedef struct FWCfgFiles {