diff options
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Virtio.h | 4 | ||||
-rw-r--r-- | OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/Virtio.h b/OvmfPkg/Include/IndustryStandard/Virtio.h index f55994ecb1..a330738999 100644 --- a/OvmfPkg/Include/IndustryStandard/Virtio.h +++ b/OvmfPkg/Include/IndustryStandard/Virtio.h @@ -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)
//
diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c index 178fe331a4..01a562d165 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -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) \
))
|