diff options
author | Thomas Huth <thuth@redhat.com> | 2018-05-26 08:06:07 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2018-05-29 19:07:25 +1000 |
commit | 5092c97eda8900070bc0be084526c89de5eed3a8 (patch) | |
tree | 212c072f844723fb3013a4468da64ba4be829f71 /include/helpers.h | |
parent | 9976594366a3e0da456e4688ac93d802dad56c71 (diff) | |
download | SLOF-5092c97eda8900070bc0be084526c89de5eed3a8.zip SLOF-5092c97eda8900070bc0be084526c89de5eed3a8.tar.gz SLOF-5092c97eda8900070bc0be084526c89de5eed3a8.tar.bz2 |
slof: Add a helper function to get the contents of a property in C code
We will need to retrieve the UUID of the VM in the libnet code, so we
need a function to get the contents from a device tree property.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'include/helpers.h')
-rw-r--r-- | include/helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/helpers.h b/include/helpers.h index 9dfe3ae..5834bce 100644 --- a/include/helpers.h +++ b/include/helpers.h @@ -40,6 +40,8 @@ extern void SLOF_set_chosen_int(const char *s, long val); extern void SLOF_set_chosen_bytes(const char *s, const char *addr, size_t size); extern void SLOF_encode_bootp_response(void *addr, size_t size); extern void SLOF_encode_dhcp_response(void *addr, size_t size); +extern int SLOF_get_property(const char *node, const char *propname, + char **addr, int *len); #define offset_of(type, member) ((long) &((type *)0)->member) #define container_of(ptr, type, member) ({ \ |