chiark / gitweb /
sd-netlink: turn 'max' into 'count' to support empty type-systems
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 23 Jun 2015 09:46:48 +0000 (11:46 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:04:18 +0000 (10:04 +0100)
commit53cb490ec6c1ebe1e19d28fdf504d0d6d57e9425
treee49ac3fdd2159cd0be5bcab53faa31b763d1441c
parentaad52fc3c7475440855cc4dd0df87fffe3f451b1
sd-netlink: turn 'max' into 'count' to support empty type-systems

Right now we store the maximum type-ID of a type-system. This prevents us
from creating empty type-systems. Store the "count" instead, which should
be treated as max+1.

Note that type_system_union_protocol_get_type_system() currently has a
nasty hack to treat empty type-systems as invalid. This might need some
modification later on as well.
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/netlink-types.c
src/libsystemd/sd-netlink/netlink-types.h