aboutsummaryrefslogtreecommitdiff
path: root/hw
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 /hw
parent544d2bfa84c43f9d4c70ca2202a6113d686b8999 (diff)
downloadqemu-35c12e60c840bc4840cbbe3f6ca514a53b2e36bc.zip
qemu-35c12e60c840bc4840cbbe3f6ca514a53b2e36bc.tar.gz
qemu-35c12e60c840bc4840cbbe3f6ca514a53b2e36bc.tar.bz2
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 'hw')
-rw-r--r--hw/core/loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 449bd4c..060729f 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -663,7 +663,7 @@ int rom_add_file(const char *file, const char *fw_dir,
rom_insert(rom);
if (rom->fw_file && fw_cfg) {
const char *basename;
- char fw_file_name[56];
+ char fw_file_name[FW_CFG_MAX_FILE_PATH];
void *data;
basename = strrchr(rom->fw_file, '/');