diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-06-23 11:07:59 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-06-24 13:45:47 +0200 |
commit | 435bbb0233018bbafc6d80d2935adb151d187d97 (patch) | |
tree | 4576573588a996a0493f11ee6b2c2ca4a6f7e275 /src/libsystemd/sd-netlink/netlink-message.c | |
parent | 817d1cd824bedba8feeef24c9724ec8bd160a7b2 (diff) |
sd-netlink: make NLTypeSystem internal
Same as NLType, move NLTypeSystem into netlink-types.c and hide it from
the outside. Provide an accessor function for the 'max' field that is used
to allocate suitable array sizes.
Note that this will probably be removed later on, anyway. Once we support
bigger type-systems, it just seems impractical to allocate such big arrays
for each container entry. An RBTree would probably do just fine.
Diffstat (limited to 'src/libsystemd/sd-netlink/netlink-message.c')
-rw-r--r-- | src/libsystemd/sd-netlink/netlink-message.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-netlink/netlink-message.c b/src/libsystemd/sd-netlink/netlink-message.c index 1780585f08..1245371f7b 100644 --- a/src/libsystemd/sd-netlink/netlink-message.c +++ b/src/libsystemd/sd-netlink/netlink-message.c @@ -754,7 +754,7 @@ int sd_netlink_message_enter_container(sd_netlink_message *m, unsigned short typ r = rtnl_message_parse(m, &m->rta_offset_tb[m->n_containers], &m->rta_tb_size[m->n_containers], - type_system->max, + type_system_get_max(type_system), container, size); if (r < 0) { @@ -890,7 +890,7 @@ int sd_netlink_message_rewind(sd_netlink_message *m) { r = rtnl_message_parse(m, &m->rta_offset_tb[m->n_containers], &m->rta_tb_size[m->n_containers], - type_system->max, + type_system_get_max(type_system), (struct rtattr*)((uint8_t*)NLMSG_DATA(m->hdr) + NLMSG_ALIGN(size)), NLMSG_PAYLOAD(m->hdr, size)); if (r < 0) |