mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
include: Move endof() up from hw/virtio/virtio.h
endof() is a useful macro, we can make use of it outside of virtio. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 20191011152814.14791-2-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
f93c3add3a
commit
5d5b33c080
4 changed files with 14 additions and 14 deletions
|
@ -37,13 +37,6 @@ static inline hwaddr vring_align(hwaddr addr,
|
|||
return QEMU_ALIGN_UP(addr, align);
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate the number of bytes up to and including the given 'field' of
|
||||
* 'container'.
|
||||
*/
|
||||
#define virtio_endof(container, field) \
|
||||
(offsetof(container, field) + sizeof_field(container, field))
|
||||
|
||||
typedef struct VirtIOFeature {
|
||||
uint64_t flags;
|
||||
size_t end;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue