]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd/sd-netlink/netlink-message.c
sd-netlink: rename NLType and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Jul 2022 05:11:00 +0000 (14:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Aug 2022 18:53:51 +0000 (03:53 +0900)
commitebf404a4d07946309131c284ea8247d096128c18
treeed320d1d6b16e52057ae8c318dbca2f05674f3f9
parent1ab7e2b58719ffa36054483c826b9f5e53206e54
sd-netlink: rename NLType and friends

In sd-netlink, we use 'type' for naming many variables with different type,
and worst of all, function like `type_get_type()` exists. That makes the
code hard to understood.

Let's rename
- NLType -> NLAPolicy
- NLTypeSystem -> NLAPolicySet
- NLTypeSystemUnion -> NLAPolicySetUnion
- type_get_type() -> policy_get_type()
- type_get_type_system() -> policy_get_policy_set(), and so on.

This also changes the type of attribute taken by e.g.
`sd_netlink_message_append_string()` from `unsigned short` -> `uint16_t`
to make the variable size clearer.
src/libsystemd/sd-netlink/netlink-genl.c
src/libsystemd/sd-netlink/netlink-internal.h
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/netlink-socket.c
src/libsystemd/sd-netlink/netlink-types-genl.c
src/libsystemd/sd-netlink/netlink-types-internal.h
src/libsystemd/sd-netlink/netlink-types-nfnl.c
src/libsystemd/sd-netlink/netlink-types-rtnl.c
src/libsystemd/sd-netlink/netlink-types.c
src/libsystemd/sd-netlink/netlink-types.h
src/systemd/sd-netlink.h