]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmgPkg: QemuFwCfgLib: export QEMU_FW_CFG_FNAME_SIZE
authorLaszlo Ersek <lersek@redhat.com>
Thu, 19 Jun 2014 06:13:01 +0000 (06:13 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 19 Jun 2014 06:13:01 +0000 (06:13 +0000)
Names of firmware configuration files always take 56 bytes (including at
least one terminating NUL byte). Expose this constant to all consumers of
QemuFwCfgLib because further interfaces may depend on it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15571 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Include/Library/QemuFwCfgLib.h
OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c

index 8d3b835d431c8b9e65aecd10ac609a4e26189b8c..baaa257d6188ece06ef4cd7815fd265e8cc946ff 100644 (file)
 #ifndef __FW_CFG_LIB__\r
 #define __FW_CFG_LIB__\r
 \r
+//\r
+// The size, in bytes, of names of firmware configuration files, including at\r
+// least one terminating NUL byte.\r
+//\r
+#define QEMU_FW_CFG_FNAME_SIZE 56\r
+\r
 typedef enum {\r
   QemuFwCfgItemSignature            = 0x0000,\r
   QemuFwCfgItemInterfaceVersion     = 0x0001,\r
index 92c85c1d3d52a27dd9a2a2240f6a5a998ff63368..24424f83a986ab39f4596b7f771b8b6f562337b9 100644 (file)
@@ -278,7 +278,7 @@ QemuFwCfgFindFile (
     UINT32 FileSize;\r
     UINT16 FileSelect;\r
     UINT16 FileReserved;\r
-    CHAR8  FName[56];\r
+    CHAR8  FName[QEMU_FW_CFG_FNAME_SIZE];\r
 \r
     FileSize     = QemuFwCfgRead32 ();\r
     FileSelect   = QemuFwCfgRead16 ();\r