]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tree-wide: hide further unnecessary symbols
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 21 Jul 2020 12:50:38 +0000 (14:50 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 21 Jul 2020 13:44:43 +0000 (15:44 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
23 files changed:
src/include/netns_ifaddrs.h
src/lxc/Makefile.am
src/lxc/af_unix.c
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup.c
src/lxc/cmd/lxc_usernsexec.c
src/lxc/conf.c
src/lxc/conf.h
src/lxc/log.c
src/lxc/log.h
src/lxc/lsm/lsm.c
src/lxc/lxc.h
src/lxc/lxccontainer.c
src/lxc/network.c
src/lxc/nl.h
src/lxc/rexec.c
src/lxc/seccomp.c
src/lxc/start.c
src/lxc/storage/rbd.c
src/lxc/storage/storage.c
src/lxc/storage/zfs.c
src/lxc/utils.c
src/tests/Makefile.am

index 0290e84ac15498c22c8377a047f1a59e0cf0eb02..1b8703ee7de0a59586855f24a0cbc22d31d246fa 100644 (file)
@@ -12,6 +12,7 @@ extern "C" {
 #include <stdbool.h>
 #include <sys/socket.h>
 
+#include "compiler.h"
 #include "netns_ifaddrs.h"
 
 struct netns_ifaddrs {
@@ -50,9 +51,9 @@ struct netns_ifaddrs {
 #define __ifa_broadaddr ifa_ifu.ifu_broadaddr
 #define __ifa_dstaddr ifa_ifu.ifu_dstaddr
 
-extern void netns_freeifaddrs(struct netns_ifaddrs *);
-extern int netns_getifaddrs(struct netns_ifaddrs **ifap, __s32 netns_id,
-                           bool *netnsid_aware);
+__hidden extern void netns_freeifaddrs(struct netns_ifaddrs *);
+__hidden extern int netns_getifaddrs(struct netns_ifaddrs **ifap, __s32 netns_id,
+                                    bool *netnsid_aware);
 
 #ifdef __cplusplus
 }
index 60e120bd885bfb4072afae3d4bc62101457929ae..d2178213623dbf064bf25faad620fb1cd56b4654 100644 (file)
@@ -332,6 +332,7 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -342,6 +343,7 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -381,6 +383,7 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
                        tools/arguments.c tools/arguments.h \
                        af_unix.c af_unix.h \
                        caps.c caps.h \
+                       cgroups/cgfsng.c \
                        cgroups/cgroup.c cgroups/cgroup.h \
                        cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                        cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -391,6 +394,7 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
                        confile_utils.c confile_utils.h \
                        error.c error.h \
                        file_utils.c file_utils.h \
+                       ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                        initutils.c initutils.h \
                        log.c log.h \
                        lxclock.c lxclock.h \
@@ -429,6 +433,7 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -439,6 +444,7 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -477,6 +483,7 @@ lxc_config_SOURCES = tools/lxc_config.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -487,6 +494,7 @@ lxc_config_SOURCES = tools/lxc_config.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -525,6 +533,7 @@ lxc_console_SOURCES = tools/lxc_console.c \
                      tools/arguments.c tools/arguments.h \
                      af_unix.c af_unix.h \
                      caps.c caps.h \
+                     cgroups/cgfsng.c \
                      cgroups/cgroup.c cgroups/cgroup.h \
                      cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                      cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -535,6 +544,7 @@ lxc_console_SOURCES = tools/lxc_console.c \
                      confile_utils.c confile_utils.h \
                      error.c error.h \
                      file_utils.c file_utils.h \
+                     ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                      initutils.c initutils.h \
                      log.c log.h \
                      lxclock.c lxclock.h \
@@ -573,6 +583,7 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
                      tools/arguments.c tools/arguments.h \
                      af_unix.c af_unix.h \
                      caps.c caps.h \
+                     cgroups/cgfsng.c \
                      cgroups/cgroup.c cgroups/cgroup.h \
                      cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                      cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -583,6 +594,7 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
                      confile_utils.c confile_utils.h \
                      error.c error.h \
                      file_utils.c file_utils.h \
+                     ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                      initutils.c initutils.h \
                      log.c log.h \
                      lxclock.c lxclock.h \
@@ -621,6 +633,7 @@ lxc_device_SOURCES = tools/lxc_device.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -631,6 +644,7 @@ lxc_device_SOURCES = tools/lxc_device.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -669,6 +683,7 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
                      tools/arguments.c tools/arguments.h \
                      af_unix.c af_unix.h \
                      caps.c caps.h \
+                     cgroups/cgfsng.c \
                      cgroups/cgroup.c cgroups/cgroup.h \
                      cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                      cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -679,6 +694,7 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
                      confile_utils.c confile_utils.h \
                      error.c error.h \
                      file_utils.c file_utils.h \
+                     ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                      initutils.c initutils.h \
                      log.c log.h \
                      lxclock.c lxclock.h \
@@ -717,6 +733,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -727,6 +744,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -765,6 +783,7 @@ lxc_info_SOURCES = tools/lxc_info.c \
                   tools/arguments.c tools/arguments.h \
                   af_unix.c af_unix.h \
                   caps.c caps.h \
+                  cgroups/cgfsng.c \
                   cgroups/cgroup.c cgroups/cgroup.h \
                   cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                   cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -775,6 +794,7 @@ lxc_info_SOURCES = tools/lxc_info.c \
                   confile_utils.c confile_utils.h \
                   error.c error.h \
                   file_utils.c file_utils.h \
+                  ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                   initutils.c initutils.h \
                   log.c log.h \
                   lxclock.c lxclock.h \
@@ -813,6 +833,7 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
                      tools/arguments.c tools/arguments.h \
                      af_unix.c af_unix.h \
                      caps.c caps.h \
+                     cgroups/cgfsng.c \
                      cgroups/cgroup.c cgroups/cgroup.h \
                      cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                      cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -823,6 +844,7 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
                      confile_utils.c confile_utils.h \
                      error.c error.h \
                      file_utils.c file_utils.h \
+                     ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                      initutils.c initutils.h \
                      log.c log.h \
                      lxclock.c lxclock.h \
@@ -862,6 +884,7 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
                 tools/arguments.c tools/arguments.h \
                 af_unix.c af_unix.h \
                 caps.c caps.h \
+                cgroups/cgfsng.c \
                 cgroups/cgroup.c cgroups/cgroup.h \
                 cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                 cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -872,6 +895,7 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
                 confile_utils.c confile_utils.h \
                 error.c error.h \
                 file_utils.c file_utils.h \
+                ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                 initutils.c initutils.h \
                 log.c log.h \
                 lxclock.c lxclock.h \
@@ -911,6 +935,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
                   tools/arguments.c tools/arguments.h \
                   af_unix.c af_unix.h \
                   caps.c caps.h \
+                  cgroups/cgfsng.c \
                   cgroups/cgroup.c cgroups/cgroup.h \
                   cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                   cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -921,6 +946,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
                   confile_utils.c confile_utils.h \
                   error.c error.h \
                   file_utils.c file_utils.h \
+                  ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                   initutils.c initutils.h \
                   log.c log.h \
                   lxclock.c lxclock.h \
@@ -959,6 +985,7 @@ lxc_start_SOURCES = tools/lxc_start.c \
                    tools/arguments.c tools/arguments.h \
                    af_unix.c af_unix.h \
                    caps.c caps.h \
+                   cgroups/cgfsng.c \
                    cgroups/cgroup.c cgroups/cgroup.h \
                    cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                    cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -969,6 +996,7 @@ lxc_start_SOURCES = tools/lxc_start.c \
                    confile_utils.c confile_utils.h \
                    error.c error.h \
                    file_utils.c file_utils.h \
+                   ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                    initutils.c initutils.h \
                    log.c log.h \
                    lxclock.c lxclock.h \
@@ -1007,6 +1035,7 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
                   tools/arguments.c tools/arguments.h \
                   af_unix.c af_unix.h \
                   caps.c caps.h \
+                  cgroups/cgfsng.c \
                   cgroups/cgroup.c cgroups/cgroup.h \
                   cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                   cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1017,6 +1046,7 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
                   confile_utils.c confile_utils.h \
                   error.c error.h \
                   file_utils.c file_utils.h \
+                  ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                   initutils.c initutils.h \
                   log.c log.h \
                   lxclock.c lxclock.h \
@@ -1055,6 +1085,7 @@ lxc_top_SOURCES = tools/lxc_top.c \
                  tools/arguments.c tools/arguments.h \
                  af_unix.c af_unix.h \
                  caps.c caps.h \
+                 cgroups/cgfsng.c \
                  cgroups/cgroup.c cgroups/cgroup.h \
                  cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                  cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1065,6 +1096,7 @@ lxc_top_SOURCES = tools/lxc_top.c \
                  confile_utils.c confile_utils.h \
                  error.c error.h \
                  file_utils.c file_utils.h \
+                 ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                  initutils.c initutils.h \
                  log.c log.h \
                  lxclock.c lxclock.h \
@@ -1103,6 +1135,7 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
                       tools/arguments.c tools/arguments.h \
                       af_unix.c af_unix.h \
                       caps.c caps.h \
+                      cgroups/cgfsng.c \
                       cgroups/cgroup.c cgroups/cgroup.h \
                       cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                       cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1113,6 +1146,7 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
                       confile_utils.c confile_utils.h \
                       error.c error.h \
                       file_utils.c file_utils.h \
+                      ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                       initutils.c initutils.h \
                       log.c log.h \
                       lxclock.c lxclock.h \
@@ -1151,6 +1185,7 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
                      tools/arguments.c tools/arguments.h \
                      af_unix.c af_unix.h \
                      caps.c caps.h \
+                     cgroups/cgfsng.c \
                      cgroups/cgroup.c cgroups/cgroup.h \
                      cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                      cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1161,6 +1196,7 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
                      confile_utils.c confile_utils.h \
                      error.c error.h \
                      file_utils.c file_utils.h \
+                     ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                      initutils.c initutils.h \
                      log.c log.h \
                      lxclock.c lxclock.h \
@@ -1201,6 +1237,7 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
                   tools/arguments.c tools/arguments.h \
                   af_unix.c af_unix.h \
                   caps.c caps.h \
+                  cgroups/cgfsng.c \
                   cgroups/cgroup.c cgroups/cgroup.h \
                   cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                   cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1211,6 +1248,7 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
                   confile_utils.c confile_utils.h \
                   error.c error.h \
                   file_utils.c file_utils.h \
+                  ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                   initutils.c initutils.h \
                   log.c log.h \
                   lxclock.c lxclock.h \
@@ -1249,6 +1287,7 @@ lxc_create_SOURCES = tools/lxc_create.c \
                     tools/arguments.c tools/arguments.h \
                     af_unix.c af_unix.h \
                     caps.c caps.h \
+                    cgroups/cgfsng.c \
                     cgroups/cgroup.c cgroups/cgroup.h \
                     cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                     cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1259,6 +1298,7 @@ lxc_create_SOURCES = tools/lxc_create.c \
                     confile_utils.c confile_utils.h \
                     error.c error.h \
                     file_utils.c file_utils.h \
+                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                     initutils.c initutils.h \
                     log.c log.h \
                     lxclock.c lxclock.h \
@@ -1297,6 +1337,7 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
                       tools/arguments.c tools/arguments.h \
                       af_unix.c af_unix.h \
                       caps.c caps.h \
+                      cgroups/cgfsng.c \
                       cgroups/cgroup.c cgroups/cgroup.h \
                       cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                       cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1307,6 +1348,7 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
                       confile_utils.c confile_utils.h \
                       error.c error.h \
                       file_utils.c file_utils.h \
+                      ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                       initutils.c initutils.h \
                       log.c log.h \
                       lxclock.c lxclock.h \
@@ -1345,6 +1387,7 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
                         tools/arguments.c tools/arguments.h \
                         af_unix.c af_unix.h \
                         caps.c caps.h \
+                        cgroups/cgfsng.c \
                         cgroups/cgroup.c cgroups/cgroup.h \
                         cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                         cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1355,6 +1398,7 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
                         confile_utils.c confile_utils.h \
                         error.c error.h \
                         file_utils.c file_utils.h \
+                        ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                         initutils.c initutils.h \
                         log.c log.h \
                         lxclock.c lxclock.h \
@@ -1415,6 +1459,7 @@ init_lxc_LDFLAGS = -pthread
 lxc_monitord_SOURCES = cmd/lxc_monitord.c \
                       af_unix.c af_unix.h \
                       caps.c caps.h \
+                      cgroups/cgfsng.c \
                       cgroups/cgroup.c cgroups/cgroup.h \
                       cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                       cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1425,6 +1470,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
                       confile_utils.c confile_utils.h \
                       error.c error.h \
                       file_utils.c file_utils.h \
+                      ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                       initutils.c initutils.h \
                       log.c log.h \
                       lxclock.c lxclock.h \
@@ -1461,9 +1507,9 @@ lxc_monitord_SOURCES += seccomp.c lxcseccomp.h
 endif
 
 lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
-                      ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                       af_unix.c af_unix.h \
                       caps.c caps.h \
+                      cgroups/cgfsng.c \
                       cgroups/cgroup.c cgroups/cgroup.h \
                       cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                       cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1474,6 +1520,7 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
                       confile_utils.c confile_utils.h \
                       error.c error.h \
                       file_utils.c file_utils.h \
+                      ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                       initutils.c initutils.h \
                       log.c log.h \
                       lxclock.c lxclock.h \
@@ -1514,6 +1561,7 @@ endif
 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
                         af_unix.c af_unix.h \
                         caps.c caps.h \
+                        cgroups/cgfsng.c \
                         cgroups/cgroup.c cgroups/cgroup.h \
                         cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
                         cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
@@ -1524,6 +1572,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
                         confile_utils.c confile_utils.h \
                         error.c error.h \
                         file_utils.c file_utils.h \
+                        ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                         initutils.c initutils.h \
                         list.h \
                         log.c log.h \
index 5cf54917f1b3b1cbc58ef3a94add620365712e53..bd29b09da07134d6977d627bd975e63a2465ade4 100644 (file)
@@ -14,6 +14,7 @@
 #include <sys/syscall.h>
 #include <sys/un.h>
 
+#include "af_unix.h"
 #include "config.h"
 #include "log.h"
 #include "macro.h"
@@ -349,7 +350,7 @@ int lxc_unix_connect_type(struct sockaddr_un *addr, int type)
        return move_fd(fd);
 }
 
-int lxc_unix_connect(struct sockaddr_un *addr, int type)
+int lxc_unix_connect(struct sockaddr_un *addr)
 {
        return lxc_unix_connect_type(addr, SOCK_STREAM);
 }
index da78f552c2b4e65e8e3d09dd1648834dab3e3c34..8d9e3d5117780db06b3d5057e9abaf6ecbe99f53 100644 (file)
@@ -145,7 +145,7 @@ static void must_append_controller(char **klist, char **nlist, char ***clist,
 /* Given a handler's cgroup data, return the struct hierarchy for the controller
  * @c, or NULL if there is none.
  */
-struct hierarchy *get_hierarchy(struct cgroup_ops *ops, const char *controller)
+static struct hierarchy *get_hierarchy(struct cgroup_ops *ops, const char *controller)
 {
        if (!ops->hierarchies)
                return log_trace_errno(NULL, errno, "There are no useable cgroup controllers");
@@ -948,8 +948,7 @@ static void lxc_cgfsng_print_basecg_debuginfo(char *basecginfo, char **klist,
                TRACE("named subsystem %d: %s", k, *it);
 }
 
-static int cgroup_tree_remove(struct hierarchy **hierarchies,
-                       const char *container_cgroup)
+static int cgroup_tree_remove(struct hierarchy **hierarchies, const char *container_cgroup)
 {
        if (!container_cgroup || !hierarchies)
                return 0;
@@ -1283,8 +1282,7 @@ static bool check_cgroup_dir_config(struct lxc_conf *conf)
        return true;
 }
 
-__cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
-                                                     struct lxc_handler *handler)
+__cgfsng_ops static bool cgfsng_monitor_create(struct cgroup_ops *ops, struct lxc_handler *handler)
 {
        __do_free char *monitor_cgroup = NULL, *__cgroup_tree = NULL;
        const char *cgroup_tree;
@@ -1372,8 +1370,7 @@ __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
  * Try to create the same cgroup in all hierarchies. Start with cgroup_pattern;
  * next cgroup_pattern-1, -2, ..., -999.
  */
-__cgfsng_ops static inline bool cgfsng_payload_create(struct cgroup_ops *ops,
-                                                     struct lxc_handler *handler)
+__cgfsng_ops static bool cgfsng_payload_create(struct cgroup_ops *ops, struct lxc_handler *handler)
 {
        __do_free char *container_cgroup = NULL,
                       *__cgroup_tree = NULL,
@@ -1672,7 +1669,7 @@ __cgfsng_ops static bool cgfsng_chown(struct cgroup_ops *ops,
        return true;
 }
 
-__cgfsng_ops void cgfsng_payload_finalize(struct cgroup_ops *ops)
+__cgfsng_ops static void cgfsng_payload_finalize(struct cgroup_ops *ops)
 {
        if (!ops)
                return;
@@ -2947,8 +2944,7 @@ __cgfsng_ops static bool cgfsng_setup_limits(struct cgroup_ops *ops,
        return log_info(true, "Limits for the unified cgroup hierarchy have been setup");
 }
 
-__cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops,
-                                         struct lxc_handler *handler)
+__cgfsng_ops static bool cgfsng_devices_activate(struct cgroup_ops *ops, struct lxc_handler *handler)
 {
 #ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX
        __do_bpf_program_free struct bpf_program *devices = NULL;
@@ -3023,7 +3019,7 @@ __cgfsng_ops bool cgfsng_devices_activate(struct cgroup_ops *ops,
        return true;
 }
 
-bool __cgfsng_delegate_controllers(struct cgroup_ops *ops, const char *cgroup)
+static bool __cgfsng_delegate_controllers(struct cgroup_ops *ops, const char *cgroup)
 {
        __do_free char *add_controllers = NULL, *base_path = NULL;
        __do_free_string_list char **parts = NULL;
@@ -3082,7 +3078,7 @@ bool __cgfsng_delegate_controllers(struct cgroup_ops *ops, const char *cgroup)
        return true;
 }
 
-__cgfsng_ops bool cgfsng_monitor_delegate_controllers(struct cgroup_ops *ops)
+__cgfsng_ops static bool cgfsng_monitor_delegate_controllers(struct cgroup_ops *ops)
 {
        if (!ops)
                return ret_set_errno(false, ENOENT);
@@ -3090,7 +3086,7 @@ __cgfsng_ops bool cgfsng_monitor_delegate_controllers(struct cgroup_ops *ops)
        return __cgfsng_delegate_controllers(ops, ops->monitor_cgroup);
 }
 
-__cgfsng_ops bool cgfsng_payload_delegate_controllers(struct cgroup_ops *ops)
+__cgfsng_ops static bool cgfsng_payload_delegate_controllers(struct cgroup_ops *ops)
 {
        if (!ops)
                return ret_set_errno(false, ENOENT);
index 7c94fd83b12a5103e7d562505c043150afefbe19..6a46fb651f15eb68342eb2ab3d261c7118a2ebaf 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "cgroup.h"
 #include "cgroup2_devices.h"
+#include "compiler.h"
 #include "conf.h"
 #include "config.h"
 #include "initutils.h"
@@ -18,7 +19,7 @@
 
 lxc_log_define(cgroup, lxc);
 
-extern struct cgroup_ops *cgfsng_ops_init(struct lxc_conf *conf);
+__hidden extern struct cgroup_ops *cgfsng_ops_init(struct lxc_conf *conf);
 
 struct cgroup_ops *cgroup_init(struct lxc_conf *conf)
 {
index aee7448ce1c014ee975dcae4e1776222db9d252b..5c12dad3b856a5b33db1f3a420855c63e64ee2a3 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/wait.h>
 #include <unistd.h>
 
+#include "compiler.h"
 #include "conf.h"
 #include "config.h"
 #include "list.h"
@@ -31,7 +32,7 @@
 #include "syscall_wrappers.h"
 #include "utils.h"
 
-extern int lxc_log_fd;
+__hidden extern int lxc_log_fd;
 
 static void usage(const char *name)
 {
index b26bbfa3264f0d130c3de5da6ec896e17066d0b4..7ea13e45042fc42d7952e687cfd3e36a7498b55f 100644 (file)
@@ -903,7 +903,7 @@ static int lxc_setup_ttys(struct lxc_conf *conf)
 
 define_cleanup_function(struct lxc_tty_info *, lxc_delete_tty);
 
-int lxc_allocate_ttys(struct lxc_conf *conf)
+static int lxc_allocate_ttys(struct lxc_conf *conf)
 {
        struct lxc_terminal_info *tty_new = NULL;
        int ret;
@@ -1262,7 +1262,7 @@ static int lxc_mount_rootfs(struct lxc_conf *conf)
        return 0;
 }
 
-int lxc_chroot(const struct lxc_rootfs *rootfs)
+static int lxc_chroot(const struct lxc_rootfs *rootfs)
 {
        __do_free char *nroot = NULL;
        int i, ret;
@@ -2702,7 +2702,7 @@ static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
        return 1;
 }
 
-int lxc_map_ids_exec_wrapper(void *args)
+static int lxc_map_ids_exec_wrapper(void *args)
 {
        execl("/bin/sh", "sh", "-c", (char *)args, (char *)NULL);
        return -1;
@@ -2898,7 +2898,7 @@ again:
 }
 
 /* NOTE: Must not be called from inside the container namespace! */
-int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
+static int lxc_create_tmp_proc_mount(struct lxc_conf *conf)
 {
        int mounted;
 
index 6ec8936da92b080726b0be86e4dae5d6a428d8fd..d78bfffb3ef17eda6cd0043fe5e486110e5767df 100644 (file)
@@ -206,7 +206,7 @@ enum lxchooks {
        NUM_LXC_HOOKS
 };
 
-extern char *lxchook_names[NUM_LXC_HOOKS];
+__hidden extern char *lxchook_names[NUM_LXC_HOOKS];
 
 struct lxc_state_client {
        int clientfd;
index 59644aa7a3a5af65bc16fda238f5300342e61112..824c3f5fa6ae32d26e538a95ee31396dcf68ba8b 100644 (file)
@@ -45,7 +45,7 @@
 
 int lxc_log_fd = -EBADF;
 static bool wants_syslog = false;
-int lxc_quiet_specified;
+static int lxc_quiet_specified;
 int lxc_log_use_global_fd;
 static int lxc_loglevel_specified;
 
index 153302fdece474fe2fd22584be5d184b09324f0a..0ddcfa20a53d012a561b09ae16f8d83b92545e6d 100644 (file)
@@ -28,8 +28,8 @@
 #define F_DUPFD_CLOEXEC 1030
 #endif
 
-#define LXC_LOG_PREFIX_SIZE    32
-#define LXC_LOG_BUFFER_SIZE    4096
+#define LXC_LOG_PREFIX_SIZE 32
+#define LXC_LOG_BUFFER_SIZE 4096
 
 /* predefined lxc log priorities. */
 enum lxc_loglevel {
@@ -277,13 +277,13 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,      \
 /*
  * Helper macro to define and use static categories.
  */
-#define lxc_log_category_define(name, parent)                          \
-       extern struct lxc_log_category lxc_log_category_##parent;       \
-       struct lxc_log_category lxc_log_category_##name = {             \
-               #name,                                                  \
-               LXC_LOG_LEVEL_NOTSET,                                   \
-               NULL,                                                   \
-               &lxc_log_category_##parent                              \
+#define lxc_log_category_define(name, parent)                                  \
+       __hidden extern struct lxc_log_category lxc_log_category_##parent;      \
+       __hidden struct lxc_log_category lxc_log_category_##name = {            \
+               #name,                                                          \
+               LXC_LOG_LEVEL_NOTSET,                                           \
+               NULL,                                                           \
+               &lxc_log_category_##parent                                      \
        };
 
 #define lxc_log_define(name, parent)                                   \
index 553e0c99a101ffd31d7d9b4d6d1785f74fe47f78..cd1f4696c6f89a4bf6a0140806aaea458c41ada5 100644 (file)
@@ -9,6 +9,7 @@
 #include <sys/param.h>
 #include <unistd.h>
 
+#include "compiler.h"
 #include "conf.h"
 #include "config.h"
 #include "log.h"
@@ -18,9 +19,9 @@ lxc_log_define(lsm, lxc);
 
 static struct lsm_drv *drv = NULL;
 
-extern struct lsm_drv *lsm_apparmor_drv_init(void);
-extern struct lsm_drv *lsm_selinux_drv_init(void);
-extern struct lsm_drv *lsm_nop_drv_init(void);
+__hidden extern struct lsm_drv *lsm_apparmor_drv_init(void);
+__hidden extern struct lsm_drv *lsm_selinux_drv_init(void);
+__hidden extern struct lsm_drv *lsm_nop_drv_init(void);
 
 __attribute__((constructor))
 void lsm_init(void)
index 630eff0b49c27dca62f7423f1f24ffe0db02a6ee..9e31366eb5f17536e09117e01ec332f17e6c113c 100644 (file)
@@ -12,6 +12,7 @@ extern "C" {
 #include <sys/select.h>
 #include <sys/types.h>
 
+#include "compiler.h"
 #include "state.h"
 
 struct lxc_msg;
@@ -32,8 +33,8 @@ struct lxc_handler;
  * @daemonize    : whether or not the container is daemonized
  * Returns 0 on success, < 0 otherwise
  */
-extern int lxc_start(char *const argv[], struct lxc_handler *handler,
-                    const char *lxcpath, bool daemonize, int *error_num);
+__hidden extern int lxc_start(char *const argv[], struct lxc_handler *handler, const char *lxcpath,
+                             bool daemonize, int *error_num);
 
 /*
  * Start the specified command inside an application container
@@ -44,39 +45,37 @@ extern int lxc_start(char *const argv[], struct lxc_handler *handler,
  * @daemonize    : whether or not the container is daemonized
  * Returns 0 on success, < 0 otherwise
  */
-extern int lxc_execute(const char *name, char *const argv[], int quiet,
-                      struct lxc_handler *handler, const char *lxcpath,
-                      bool daemonize, int *error_num);
+__hidden extern int lxc_execute(const char *name, char *const argv[], int quiet,
+                               struct lxc_handler *handler, const char *lxcpath, bool daemonize,
+                               int *error_num);
 
 /*
  * Close the fd associated with the monitoring
  * @fd : the file descriptor provided by lxc_monitor_open
  * Returns 0 on success, < 0 otherwise
  */
-extern int lxc_monitor_close(int fd);
+__hidden extern int lxc_monitor_close(int fd);
 
 /*
  * Freeze all the tasks running inside the container <name>
  * @name : the container name
  * Returns 0 on success, < 0 otherwise
  */
-extern int lxc_freeze(struct lxc_conf *conf, const char *name,
-                     const char *lxcpath);
+__hidden extern int lxc_freeze(struct lxc_conf *conf, const char *name, const char *lxcpath);
 
 /*
  * Unfreeze all previously frozen tasks.
  * @name : the name of the container
  * Return 0 on success, < 0 otherwise
  */
-extern int lxc_unfreeze(struct lxc_conf *conf, const char *name,
-                       const char *lxcpath);
+__hidden extern int lxc_unfreeze(struct lxc_conf *conf, const char *name, const char *lxcpath);
 
 /*
  * Retrieve the container state
  * @name : the name of the container
  * Returns the state of the container on success, < 0 otherwise
  */
-extern lxc_state_t lxc_state(const char *name, const char *lxcpath);
+__hidden extern lxc_state_t lxc_state(const char *name, const char *lxcpath);
 
 /*
  * Create and return a new lxccontainer struct.
@@ -105,17 +104,16 @@ extern int lxc_get_wait_states(const char **states);
 /*
  * Add a dependency to a container
  */
-extern int add_rdepend(struct lxc_conf *lxc_conf, char *rdepend);
+__hidden extern int add_rdepend(struct lxc_conf *lxc_conf, char *rdepend);
 
 /*
  * Set a key/value configuration option. Requires that to take a lock on the
  * in-memory config of the container.
  */
-extern int lxc_set_config_item_locked(struct lxc_conf *conf, const char *key,
-                                     const char *v);
+__hidden extern int lxc_set_config_item_locked(struct lxc_conf *conf, const char *key, const char *v);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif
+#endif /* __LXC_LXC_H */
index 21b1cb07151a656261cac49a555a4bd7d2c23207..baffaae78a8997be7036a4c74a79ea71c13a5476 100644 (file)
@@ -3540,7 +3540,7 @@ static bool add_rdepends(struct lxc_container *c, struct lxc_container *c0)
  * then default to those even if not requested.
  * Currently we only do this for btrfs.
  */
-bool should_default_to_snapshot(struct lxc_container *c0,
+static bool should_default_to_snapshot(struct lxc_container *c0,
                                struct lxc_container *c1)
 {
        __do_free char *p0 = NULL, *p1 = NULL;
index ff0f7bf6d5525524c77587c1045552ca0f35c38c..bfffb2256b33fb352b5fd2e3b029502d0e33d0e2 100644 (file)
@@ -1737,7 +1737,7 @@ int netdev_set_flag(const char *name, int flag)
        return netlink_transaction(nlh_ptr, nlmsg, answer);
 }
 
-int netdev_get_flag(const char *name, int *flag)
+static int netdev_get_flag(const char *name, int *flag)
 {
        call_cleaner(nlmsg_free) struct nlmsg *answer = NULL, *nlmsg = NULL;
        struct nl_handler nlh;
@@ -3084,7 +3084,7 @@ static int lxc_delete_network_unpriv_exec(const char *lxcpath, const char *lxcna
        return 0;
 }
 
-bool lxc_delete_network_unpriv(struct lxc_handler *handler)
+static bool lxc_delete_network_unpriv(struct lxc_handler *handler)
 {
        int ret;
        struct lxc_list *iterator;
@@ -3464,7 +3464,7 @@ static int lxc_create_network_unpriv(struct lxc_handler *handler)
        return 0;
 }
 
-bool lxc_delete_network_priv(struct lxc_handler *handler)
+static bool lxc_delete_network_priv(struct lxc_handler *handler)
 {
        int ret;
        struct lxc_list *iterator;
index ab8368fe64109043b82ce539dc45f92e5312d123..1135d1f6655d19aa4536df3539a22b1360edb744 100644 (file)
@@ -122,7 +122,7 @@ __hidden extern int __netlink_transaction(struct nl_handler *handler, struct nlm
  *
  * Returns 0 on success, < 0 otherwise
  */
-__hidden int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string);
+__hidden extern int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string);
 
 /*
  * nla_put_buffer: copy a buffer with a specified size to a netlink
@@ -135,8 +135,7 @@ __hidden int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string);
  *
  * Returns 0 on success, < 0 otherwise
  */
-int nla_put_buffer(struct nlmsg *nlmsg, int attr,
-                  const void *data, size_t size);
+__hidden extern int nla_put_buffer(struct nlmsg *nlmsg, int attr, const void *data, size_t size);
 
 /*
  * nla_put_u32: copy an integer to a netlink message attribute
@@ -147,7 +146,7 @@ int nla_put_buffer(struct nlmsg *nlmsg, int attr,
  *
  * Returns 0 on success, < 0 otherwise
  */
-int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
+__hidden extern int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
 
 /*
  * nla_put_u16: copy an integer to a netlink message attribute
@@ -158,7 +157,7 @@ int nla_put_u32(struct nlmsg *nlmsg, int attr, int value);
  *
  * Returns 0 on success, < 0 otherwise
  */
-int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value);
+__hidden extern int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value);
 
 /*
  * nla_put_attr: add an attribute name to a netlink
@@ -168,7 +167,7 @@ int nla_put_u16(struct nlmsg *nlmsg, int attr, unsigned short value);
  *
  * Returns 0 on success, < 0 otherwise
  */
-int nla_put_attr(struct nlmsg *nlmsg, int attr);
+__hidden extern int nla_put_attr(struct nlmsg *nlmsg, int attr);
 
 /*
  * nla_begin_nested: begin the nesting attribute
index cf198c02111d96bd10ef4955fca62cc59c552cd1..95a038272b167bbab53f8d209c97715b6ea3fb80 100644 (file)
@@ -14,6 +14,7 @@
 #include "macro.h"
 #include "memory_utils.h"
 #include "process_utils.h"
+#include "rexec.h"
 #include "string_utils.h"
 #include "syscall_wrappers.h"
 
index d9541fb572e8c0e5c5cf4dc2c3ade2130fdfd02f..66f9a70f228e913b5288849eaac0c5e99c6e0185 100644 (file)
@@ -317,7 +317,7 @@ enum lxc_hostarch_t {
        lxc_seccomp_arch_unknown = 999,
 };
 
-int get_hostarch(void)
+static int get_hostarch(void)
 {
        struct utsname uts;
        if (uname(&uts) < 0) {
@@ -351,8 +351,8 @@ int get_hostarch(void)
        return lxc_seccomp_arch_unknown;
 }
 
-scmp_filter_ctx get_new_ctx(enum lxc_hostarch_t n_arch,
-                           uint32_t default_policy_action, bool *needs_merge)
+static scmp_filter_ctx get_new_ctx(enum lxc_hostarch_t n_arch, uint32_t default_policy_action,
+                                  bool *needs_merge)
 {
        int ret;
        uint32_t arch;
@@ -485,8 +485,8 @@ scmp_filter_ctx get_new_ctx(enum lxc_hostarch_t n_arch,
        return ctx;
 }
 
-bool do_resolve_add_rule(uint32_t arch, char *line, scmp_filter_ctx ctx,
-                        struct seccomp_v2_rule *rule)
+static bool do_resolve_add_rule(uint32_t arch, char *line, scmp_filter_ctx ctx,
+                               struct seccomp_v2_rule *rule)
 {
        int i, nr, ret;
        struct scmp_arg_cmp arg_cmp[6];
index 11f452e78a646eaefb5e27bf7d5665a5d8300a99..da6323035d7ea9a155d67cf85e119c94bd4265ce 100644 (file)
@@ -30,6 +30,7 @@
 #include "cgroup.h"
 #include "commands.h"
 #include "commands_utils.h"
+#include "compiler.h"
 #include "conf.h"
 #include "config.h"
 #include "confile_utils.h"
index e7ba8930c942a521397b5fbacafe4752f0db92a4..7a8a8b8be20e4296a37ee0dc0f8ea8321a1d4f9d 100644 (file)
@@ -29,7 +29,7 @@ struct rbd_args {
        const char *size;
 };
 
-int rbd_create_wrapper(void *data)
+static int rbd_create_wrapper(void *data)
 {
        struct rbd_args *args = data;
 
@@ -39,7 +39,7 @@ int rbd_create_wrapper(void *data)
        return -1;
 }
 
-int rbd_map_wrapper(void *data)
+static int rbd_map_wrapper(void *data)
 {
        struct rbd_args *args = data;
 
@@ -49,7 +49,7 @@ int rbd_map_wrapper(void *data)
        return -1;
 }
 
-int rbd_unmap_wrapper(void *data)
+static int rbd_unmap_wrapper(void *data)
 {
        struct rbd_args *args = data;
 
@@ -58,7 +58,7 @@ int rbd_unmap_wrapper(void *data)
        return -1;
 }
 
-int rbd_delete_wrapper(void *data)
+static int rbd_delete_wrapper(void *data)
 {
        struct rbd_args *args = data;
 
index 3f1b713f6aaa571b75890ad205c1c95da58fefe8..b613f888dec5835208ad99d79931e3d734c09e3d 100644 (file)
@@ -109,7 +109,7 @@ static const struct lxc_storage_ops lvm_ops = {
 };
 
 /* nbd */
-const struct lxc_storage_ops nbd_ops = {
+static const struct lxc_storage_ops nbd_ops = {
     .detect = &nbd_detect,
     .mount = &nbd_mount,
     .umount = &nbd_umount,
@@ -234,7 +234,7 @@ static const struct lxc_storage_type *storage_query(struct lxc_conf *conf)
        return &bdevs[i];
 }
 
-struct lxc_storage *storage_get(const char *type)
+static struct lxc_storage *storage_get(const char *type)
 {
        size_t i;
        struct lxc_storage *bdev;
index ee9e32d0a62317fcec18ce11ad1641b7ac56b26a..b6a26a1b0dac707d1f6f10caf9d36c10f361dccb 100644 (file)
@@ -28,7 +28,7 @@ struct zfs_args {
        void *argv;
 };
 
-int zfs_detect_exec_wrapper(void *data)
+static int zfs_detect_exec_wrapper(void *data)
 {
        struct zfs_args *args = data;
 
@@ -38,7 +38,7 @@ int zfs_detect_exec_wrapper(void *data)
        return -1;
 }
 
-int zfs_create_exec_wrapper(void *args)
+static int zfs_create_exec_wrapper(void *args)
 {
        struct zfs_args *zfs_args = args;
 
@@ -47,7 +47,7 @@ int zfs_create_exec_wrapper(void *args)
        return -1;
 }
 
-int zfs_delete_exec_wrapper(void *args)
+static int zfs_delete_exec_wrapper(void *args)
 {
        struct zfs_args *zfs_args = args;
 
@@ -56,7 +56,7 @@ int zfs_delete_exec_wrapper(void *args)
        return -1;
 }
 
-int zfs_snapshot_exec_wrapper(void *args)
+static int zfs_snapshot_exec_wrapper(void *args)
 {
        struct zfs_args *zfs_args = args;
 
@@ -65,7 +65,7 @@ int zfs_snapshot_exec_wrapper(void *args)
        return -1;
 }
 
-int zfs_clone_exec_wrapper(void *args)
+static int zfs_clone_exec_wrapper(void *args)
 {
        struct zfs_args *zfs_args = args;
 
@@ -76,7 +76,7 @@ int zfs_clone_exec_wrapper(void *args)
        return -1;
 }
 
-int zfs_get_parent_snapshot_exec_wrapper(void *args)
+static int zfs_get_parent_snapshot_exec_wrapper(void *args)
 {
        struct zfs_args *zfs_args = args;
 
index cb7ca1d887594ff6c81825d9e46af866947a6ad7..39de189afc482207d816944638f1a80b2770caa5 100644 (file)
@@ -1544,7 +1544,7 @@ pop_stack:
        return umounts;
 }
 
-int run_command_internal(char *buf, size_t buf_size, int (*child_fn)(void *), void *args, bool wait_status)
+static int run_command_internal(char *buf, size_t buf_size, int (*child_fn)(void *), void *args, bool wait_status)
 {
        pid_t child;
        int ret, fret, pipefd[2];
index 8e4e49668dfdb9106edba97b98d78b0781b6ee9c..2b66bc9cd556c68d817741761a2651112b1a8992 100644 (file)
@@ -22,6 +22,7 @@ endif
 lxc_test_api_reboot_SOURCES = api_reboot.c \
                              ../lxc/af_unix.c ../lxc/af_unix.h \
                              ../lxc/caps.c ../lxc/caps.h \
+                             ../lxc/cgroups/cgfsng.c \
                              ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                              ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                              ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -32,6 +33,7 @@ lxc_test_api_reboot_SOURCES = api_reboot.c \
                              ../lxc/confile_utils.c ../lxc/confile_utils.h \
                              ../lxc/error.c ../lxc/error.h \
                              ../lxc/file_utils.c ../lxc/file_utils.h \
+                             ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                              ../lxc/initutils.c ../lxc/initutils.h \
                              ../lxc/log.c ../lxc/log.h \
                              ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -69,6 +71,7 @@ endif
 lxc_test_apparmor_SOURCES = aa.c \
                            ../lxc/af_unix.c ../lxc/af_unix.h \
                            ../lxc/caps.c ../lxc/caps.h \
+                           ../lxc/cgroups/cgfsng.c \
                            ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                            ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                            ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -79,6 +82,7 @@ lxc_test_apparmor_SOURCES = aa.c \
                            ../lxc/confile_utils.c ../lxc/confile_utils.h \
                            ../lxc/error.c ../lxc/error.h \
                            ../lxc/file_utils.c ../lxc/file_utils.h \
+                           ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                            ../lxc/initutils.c ../lxc/initutils.h \
                            ../lxc/log.c ../lxc/log.h \
                            ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -116,6 +120,7 @@ endif
 lxc_test_attach_SOURCES = attach.c \
                          ../lxc/af_unix.c ../lxc/af_unix.h \
                          ../lxc/caps.c ../lxc/caps.h \
+                         ../lxc/cgroups/cgfsng.c \
                          ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                          ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                          ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -126,6 +131,7 @@ lxc_test_attach_SOURCES = attach.c \
                          ../lxc/confile_utils.c ../lxc/confile_utils.h \
                          ../lxc/error.c ../lxc/error.h \
                          ../lxc/file_utils.c ../lxc/file_utils.h \
+                         ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                          ../lxc/initutils.c ../lxc/initutils.h \
                          ../lxc/log.c ../lxc/log.h \
                          ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -164,6 +170,7 @@ lxc_test_basic_SOURCES = basic.c
 lxc_test_cgpath_SOURCES = cgpath.c \
                          ../lxc/af_unix.c ../lxc/af_unix.h \
                          ../lxc/caps.c ../lxc/caps.h \
+                         ../lxc/cgroups/cgfsng.c \
                          ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                          ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                          ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -174,6 +181,7 @@ lxc_test_cgpath_SOURCES = cgpath.c \
                          ../lxc/confile_utils.c ../lxc/confile_utils.h \
                          ../lxc/error.c ../lxc/error.h \
                          ../lxc/file_utils.c ../lxc/file_utils.h \
+                         ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                          ../lxc/initutils.c ../lxc/initutils.h \
                          ../lxc/log.c ../lxc/log.h \
                          ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -214,6 +222,7 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \
                                     lxctest.h \
                                     ../lxc/af_unix.c ../lxc/af_unix.h \
                                     ../lxc/caps.c ../lxc/caps.h \
+                                    ../lxc/cgroups/cgfsng.c \
                                     ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                                     ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                                     ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -224,6 +233,7 @@ lxc_test_config_jump_table_SOURCES = config_jump_table.c \
                                     ../lxc/confile_utils.c ../lxc/confile_utils.h \
                                     ../lxc/error.c ../lxc/error.h \
                                     ../lxc/file_utils.c ../lxc/file_utils.h \
+                                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                                     ../lxc/initutils.c ../lxc/initutils.h \
                                     ../lxc/log.c ../lxc/log.h \
                                     ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -272,6 +282,7 @@ lxc_test_list_SOURCES = list.c
 lxc_test_locktests_SOURCES = locktests.c \
                             ../lxc/af_unix.c ../lxc/af_unix.h \
                             ../lxc/caps.c ../lxc/caps.h \
+                            ../lxc/cgroups/cgfsng.c \
                             ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                             ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                             ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -282,6 +293,7 @@ lxc_test_locktests_SOURCES = locktests.c \
                             ../lxc/confile_utils.c ../lxc/confile_utils.h \
                             ../lxc/error.c ../lxc/error.h \
                             ../lxc/file_utils.c ../lxc/file_utils.h \
+                            ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                             ../lxc/initutils.c ../lxc/initutils.h \
                             ../lxc/log.c ../lxc/log.h \
                             ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -322,6 +334,7 @@ lxc_test_mount_injection_SOURCES = mount_injection.c \
                                   lxctest.h \
                                   ../lxc/af_unix.c ../lxc/af_unix.h \
                                   ../lxc/caps.c ../lxc/caps.h \
+                                  ../lxc/cgroups/cgfsng.c \
                                   ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                                   ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                                   ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -332,6 +345,7 @@ lxc_test_mount_injection_SOURCES = mount_injection.c \
                                   ../lxc/confile_utils.c ../lxc/confile_utils.h \
                                   ../lxc/error.c ../lxc/error.h \
                                   ../lxc/file_utils.c ../lxc/file_utils.h \
+                                  ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                                   ../lxc/initutils.c ../lxc/initutils.h \
                                   ../lxc/log.c ../lxc/log.h \
                                   ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -370,6 +384,7 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \
                                     lxctest.h \
                                     ../lxc/af_unix.c ../lxc/af_unix.h \
                                     ../lxc/caps.c ../lxc/caps.h \
+                                    ../lxc/cgroups/cgfsng.c \
                                     ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                                     ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                                     ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -380,6 +395,7 @@ lxc_test_parse_config_file_SOURCES = parse_config_file.c \
                                     ../lxc/confile_utils.c ../lxc/confile_utils.h \
                                     ../lxc/error.c ../lxc/error.h \
                                     ../lxc/file_utils.c ../lxc/file_utils.h \
+                                    ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                                     ../lxc/initutils.c ../lxc/initutils.h \
                                     ../lxc/log.c ../lxc/log.h \
                                     ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -418,6 +434,7 @@ lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
                             lxctest.h \
                             ../lxc/af_unix.c ../lxc/af_unix.h \
                             ../lxc/caps.c ../lxc/caps.h \
+                            ../lxc/cgroups/cgfsng.c \
                             ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                             ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                             ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -428,6 +445,7 @@ lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
                             ../lxc/confile_utils.c ../lxc/confile_utils.h \
                             ../lxc/error.c ../lxc/error.h \
                             ../lxc/file_utils.c ../lxc/file_utils.h \
+                            ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                             ../lxc/initutils.c ../lxc/initutils.h \
                             ../lxc/log.c ../lxc/log.h \
                             ../lxc/lxclock.c ../lxc/lxclock.h \
@@ -480,6 +498,7 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \
                         lxctest.h \
                          ../lxc/af_unix.c ../lxc/af_unix.h \
                          ../lxc/caps.c ../lxc/caps.h \
+                         ../lxc/cgroups/cgfsng.c \
                          ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
                          ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
                          ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
@@ -490,6 +509,7 @@ lxc_test_utils_SOURCES = lxc-test-utils.c \
                          ../lxc/confile_utils.c ../lxc/confile_utils.h \
                          ../lxc/error.c ../lxc/error.h \
                          ../lxc/file_utils.c ../lxc/file_utils.h \
+                         ../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
                          ../lxc/initutils.c ../lxc/initutils.h \
                          ../lxc/log.c ../lxc/log.h \
                          ../lxc/lxclock.c ../lxc/lxclock.h \