OvmfPkg: rename OFFSET_OF_VHDR() / SIZE_OF_VHDR() to *_OF_VBLK()

since they are in fact virtio-blk specific.

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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13840 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2012-10-12 18:53:20 +00:00
parent 55c3443a4f
commit a9624f945e
2 changed files with 6 additions and 6 deletions

View File

@ -124,8 +124,8 @@ typedef struct {
} VBLK_HDR;
#pragma pack()
#define OFFSET_OF_VHDR(Field) OFFSET_OF (VBLK_HDR, Field)
#define SIZE_OF_VHDR(Field) (sizeof ((VBLK_HDR *) 0)->Field)
#define OFFSET_OF_VBLK(Field) OFFSET_OF (VBLK_HDR, Field)
#define SIZE_OF_VBLK(Field) (sizeof ((VBLK_HDR *) 0)->Field)
//

View File

@ -197,15 +197,15 @@ VirtioRead (
#define VIRTIO_CFG_WRITE(Dev, Field, Value) (VirtioWrite ( \
(Dev)->PciIo, \
OFFSET_OF_VHDR (Field), \
SIZE_OF_VHDR (Field), \
OFFSET_OF_VBLK (Field), \
SIZE_OF_VBLK (Field), \
(Value) \
))
#define VIRTIO_CFG_READ(Dev, Field, Pointer) (VirtioRead ( \
(Dev)->PciIo, \
OFFSET_OF_VHDR (Field), \
SIZE_OF_VHDR (Field), \
OFFSET_OF_VBLK (Field), \
SIZE_OF_VBLK (Field), \
sizeof *(Pointer), \
(Pointer) \
))