]> git.proxmox.com Git - mirror_lxc.git/commitdiff
api_extension: add cgroup2_devices api extension
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Dec 2019 10:55:19 +0000 (11:55 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Dec 2019 10:56:43 +0000 (11:56 +0100)
This will only be defined if liblxc was even compiled with bpf supported.
Support itself will be determined at runtime by liblxc itself.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/api_extensions.h

index a063c0a75c31b5f8a51acc974b2bdc623a8b64b7..ba9ff7ff679432e1d4e4d6e631d45b3309d4aa17 100644 (file)
@@ -24,6 +24,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "config.h"
+
 /*
  * api_extensions is the list of all API extensions in the order they were
  * added.
@@ -50,6 +52,9 @@ static char *api_extensions[] = {
        "network_gateway_device_route",
        "network_phys_macvlan_mtu",
        "network_veth_router",
+#ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX
+       "cgroup2_devices",
+#endif
 };
 
 static size_t nr_api_extensions = sizeof(api_extensions) / sizeof(*api_extensions);