diff options
author | Thomas Haller <thaller@redhat.com> | 2024-05-07 08:08:58 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2024-05-07 08:08:58 (GMT) |
commit | 7cc72d19f84698a194bee843af66be9be6179baa (patch) | |
tree | 38d8eda86daad648c4651ce3f9f0095702f5e575 | |
parent | 30da51072975cd7733cfee27305f8512b733216e (diff) | |
download | libnl-7cc72d19f84698a194bee843af66be9be6179baa.zip libnl-7cc72d19f84698a194bee843af66be9be6179baa.tar.gz libnl-7cc72d19f84698a194bee843af66be9be6179baa.tar.bz2 |
utils: reserve the nl_has_capabiliy numbers for releases 3.10 - 3.12
Fix the capability numbers for the next few releases already. While not
yet in use, the number is reserved and stable.
-rw-r--r-- | include/netlink/utils.h | 18 | ||||
-rw-r--r-- | lib/utils.c | 6 |
2 files changed, 21 insertions, 3 deletions
diff --git a/include/netlink/utils.h b/include/netlink/utils.h index 11a6b93..b3a5951 100644 --- a/include/netlink/utils.h +++ b/include/netlink/utils.h @@ -331,6 +331,24 @@ enum { NL_CAPABILITY_VERSION_3_9_0 = 35, #define NL_CAPABILITY_VERSION_3_9_0 NL_CAPABILITY_VERSION_3_9_0 + /** + * The library version is libnl3 3.10.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_10_0 = 36, +#define NL_CAPABILITY_VERSION_3_10_0 NL_CAPABILITY_VERSION_3_10_0 + + /** + * The library version is libnl3 3.11.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_11_0 = 37, +#define NL_CAPABILITY_VERSION_3_11_0 NL_CAPABILITY_VERSION_3_11_0 + + /** + * The library version is libnl3 3.12.0 or newer. This capability should never be backported. + */ + NL_CAPABILITY_VERSION_3_12_0 = 38, +#define NL_CAPABILITY_VERSION_3_12_0 NL_CAPABILITY_VERSION_3_12_0 + __NL_CAPABILITY_MAX, NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1), #define NL_CAPABILITY_MAX NL_CAPABILITY_MAX diff --git a/lib/utils.c b/lib/utils.c index 471cd21..1d56f1d 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1283,9 +1283,9 @@ int nl_has_capability (int capability) NL_CAPABILITY_VERSION_3_7_0, NL_CAPABILITY_VERSION_3_8_0, NL_CAPABILITY_VERSION_3_9_0, - 0, - 0, - 0, + 0, /* NL_CAPABILITY_VERSION_3_10_0 */ + 0, /* NL_CAPABILITY_VERSION_3_11_0 */ + 0, /* NL_CAPABILITY_VERSION_3_12_0 */ 0, 0), /* IMPORTANT: these capability numbers are intended to be universal and stable |