]> git.ipfire.org Git - thirdparty/systemd.git/commit
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)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 24 Jun 2015 11:45:47 +0000 (13:45 +0200)
commitc1df8dee2811e76ec2f7306f13b7559044a88842
tree8c348058b27cca9b24c6f23431da452fcc4bcd34
parent6c14ad61db68e24932329c4137198ef7f46e35e8
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