projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d10ba83
)
efi: add poor man's offsetof() implementation
author
Lennart Poettering
<lennart@poettering.net>
Thu, 21 Jun 2018 16:49:52 +0000
(18:49 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 16 Oct 2018 14:44:34 +0000
(16:44 +0200)
src/boot/efi/util.h
patch
|
blob
|
history
diff --git
a/src/boot/efi/util.h
b/src/boot/efi/util.h
index
8a3e052
..
3e6e610
100644
(file)
--- a/
src/boot/efi/util.h
+++ b/
src/boot/efi/util.h
@@
-5,6
+5,7
@@
#include <efilib.h>
#define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
+#define OFFSETOF(x,y) ((UINTN) &(((x*)0)->y))
static inline const CHAR16 *yes_no(BOOLEAN b) {
return b ? L"yes" : L"no";