From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWMoS-0005RL-Rg for qemu-devel@nongnu.org; Wed, 16 Oct 2013 04:50:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWMoJ-0004y9-EG for qemu-devel@nongnu.org; Wed, 16 Oct 2013 04:50:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWMoI-0004xy-V6 for qemu-devel@nongnu.org; Wed, 16 Oct 2013 04:50:31 -0400 From: Igor Mammedov Date: Wed, 16 Oct 2013 10:49:13 +0200 Message-Id: <1381913354-8815-4-git-send-email-imammedo@redhat.com> In-Reply-To: <1381913354-8815-1-git-send-email-imammedo@redhat.com> References: <1381913354-8815-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] fw_cfg: make cast macro available to world List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com, armbru@redhat.com, blauwirbel@gmail.com, kraxel@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, afaerber@suse.de Signed-off-by: Igor Mammedov --- hw/nvram/fw_cfg.c | 4 ---- include/hw/nvram/fw_cfg.h | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index d0820e5..6c31e24 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -32,10 +32,6 @@ #define FW_CFG_SIZE 2 #define FW_CFG_DATA_SIZE 1 -#define TYPE_FW_CFG "fw_cfg" -#define FW_CFG_NAME "fw_cfg" -#define FW_CFG_PATH "/machine/" FW_CFG_NAME -#define FW_CFG(obj) OBJECT_CHECK(FWCfgState, (obj), TYPE_FW_CFG) typedef struct FWCfgEntry { uint32_t len; diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index f60dd67..651fe21 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -6,6 +6,7 @@ #include #include "exec/hwaddr.h" +#include "qom/object.h" #include "qemu/typedefs.h" #endif @@ -47,6 +48,12 @@ #define FW_CFG_INVALID 0xffff #ifndef NO_QEMU_PROTOS + +#define TYPE_FW_CFG "fw_cfg" +#define FW_CFG_NAME "fw_cfg" +#define FW_CFG_PATH "/machine/" FW_CFG_NAME +#define FW_CFG(obj) OBJECT_CHECK(FWCfgState, (obj), TYPE_FW_CFG) + typedef struct FWCfgFile { uint32_t size; /* file size */ uint16_t select; /* write this to 0x510 to read it */ -- 1.7.1