mirror of https://github.com/acidanthera/audk.git
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:
parent
55c3443a4f
commit
a9624f945e
|
@ -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)
|
||||
|
||||
|
||||
//
|
||||
|
|
|
@ -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) \
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue