]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile_utils: hide unnecessary symbols
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 20 Jul 2020 14:10:28 +0000 (16:10 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 20 Jul 2020 14:10:28 +0000 (16:10 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/Makefile.am
src/lxc/confile_utils.h
src/tests/Makefile.am

index 4adcc679d7f5edbd2037acae52cf27815c89f2f3..de22ab0cdf15ff5d252ebd4c6042532e3087fdbb 100644 (file)
@@ -335,6 +335,7 @@ lxc_attach_SOURCES = tools/lxc_attach.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     rexec.c rexec.h \
                     string_utils.c string_utils.h
 lxc_autostart_SOURCES = tools/lxc_autostart.c \
@@ -343,6 +344,7 @@ lxc_autostart_SOURCES = tools/lxc_autostart.c \
                        caps.c caps.h \
                        conf.c conf.h \
                        confile.c confile.h \
+                       confile_utils.c confile_utils.h \
                        string_utils.c string_utils.h
 lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
                     tools/arguments.c tools/arguments.h \
@@ -350,6 +352,7 @@ lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     string_utils.c string_utils.h
 lxc_config_SOURCES = tools/lxc_config.c \
                     tools/arguments.c tools/arguments.h \
@@ -357,6 +360,7 @@ lxc_config_SOURCES = tools/lxc_config.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     string_utils.c string_utils.h
 lxc_console_SOURCES = tools/lxc_console.c \
                      tools/arguments.c tools/arguments.h \
@@ -364,6 +368,7 @@ lxc_console_SOURCES = tools/lxc_console.c \
                      caps.c caps.h \
                      conf.c conf.h \
                      confile.c confile.h \
+                     confile_utils.c confile_utils.h \
                      string_utils.c string_utils.h
 lxc_destroy_SOURCES = tools/lxc_destroy.c \
                      tools/arguments.c tools/arguments.h \
@@ -371,6 +376,7 @@ lxc_destroy_SOURCES = tools/lxc_destroy.c \
                      caps.c caps.h \
                      conf.c conf.h \
                      confile.c confile.h \
+                     confile_utils.c confile_utils.h \
                      string_utils.c string_utils.h
 lxc_device_SOURCES = tools/lxc_device.c \
                     tools/arguments.c tools/arguments.h \
@@ -378,6 +384,7 @@ lxc_device_SOURCES = tools/lxc_device.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     string_utils.c string_utils.h
 lxc_execute_SOURCES = tools/lxc_execute.c \
                      tools/arguments.c tools/arguments.h \
@@ -385,6 +392,7 @@ lxc_execute_SOURCES = tools/lxc_execute.c \
                      caps.c caps.h \
                      conf.c conf.h \
                      confile.c confile.h \
+                     confile_utils.c confile_utils.h \
                      string_utils.c string_utils.h
 lxc_freeze_SOURCES = tools/lxc_freeze.c \
                     tools/arguments.c tools/arguments.h \
@@ -392,6 +400,7 @@ lxc_freeze_SOURCES = tools/lxc_freeze.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     string_utils.c string_utils.h
 lxc_info_SOURCES = tools/lxc_info.c \
                   tools/arguments.c tools/arguments.h \
@@ -399,6 +408,7 @@ lxc_info_SOURCES = tools/lxc_info.c \
                   caps.c caps.h \
                   conf.c conf.h \
                   confile.c confile.h \
+                  confile_utils.c confile_utils.h \
                   string_utils.c string_utils.h
 lxc_monitor_SOURCES = tools/lxc_monitor.c \
                      tools/arguments.c tools/arguments.h \
@@ -406,6 +416,7 @@ lxc_monitor_SOURCES = tools/lxc_monitor.c \
                      caps.c caps.h \
                      conf.c conf.h \
                      confile.c confile.h \
+                     confile_utils.c confile_utils.h \
                      macro.h \
                      string_utils.c string_utils.h
 lxc_ls_SOURCES = tools/lxc_ls.c \
@@ -414,6 +425,7 @@ lxc_ls_SOURCES = tools/lxc_ls.c \
                 caps.c caps.h \
                 conf.c conf.h \
                 confile.c confile.h \
+                confile_utils.c confile_utils.h \
                 memory_utils.h \
                 string_utils.c string_utils.h
 lxc_copy_SOURCES = tools/lxc_copy.c \
@@ -422,6 +434,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c \
                   caps.c caps.h \
                   conf.c conf.h \
                   confile.c confile.h \
+                  confile_utils.c confile_utils.h \
                   storage/storage_utils.c storage/storage_utils.h \
                   string_utils.c string_utils.h
 lxc_start_SOURCES = tools/lxc_start.c \
@@ -430,6 +443,7 @@ lxc_start_SOURCES = tools/lxc_start.c \
                    caps.c caps.h \
                    conf.c conf.h \
                    confile.c confile.h \
+                   confile_utils.c confile_utils.h \
                    string_utils.c string_utils.h
 lxc_stop_SOURCES = tools/lxc_stop.c \
                   tools/arguments.c tools/arguments.h \
@@ -437,6 +451,7 @@ lxc_stop_SOURCES = tools/lxc_stop.c \
                   caps.c caps.h \
                   conf.c conf.h \
                   confile.c confile.h \
+                  confile_utils.c confile_utils.h \
                   string_utils.c string_utils.h
 lxc_top_SOURCES = tools/lxc_top.c \
                  tools/arguments.c tools/arguments.h \
@@ -444,6 +459,7 @@ lxc_top_SOURCES = tools/lxc_top.c \
                  caps.c caps.h \
                  conf.c conf.h \
                  confile.c confile.h \
+                 confile_utils.c confile_utils.h \
                  string_utils.c string_utils.h
 lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
                       tools/arguments.c tools/arguments.h \
@@ -451,6 +467,7 @@ lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
                       caps.c caps.h \
                       conf.c conf.h \
                       confile.c confile.h \
+                      confile_utils.c confile_utils.h \
                       string_utils.c string_utils.h
 lxc_unshare_SOURCES = tools/lxc_unshare.c \
                      tools/arguments.c tools/arguments.h \
@@ -458,6 +475,7 @@ lxc_unshare_SOURCES = tools/lxc_unshare.c \
                      caps.c caps.h \
                      conf.c conf.h \
                      confile.c confile.h \
+                     confile_utils.c confile_utils.h \
                      string_utils.c string_utils.h \
                      syscall_numbers.h \
                      syscall_wrappers.h
@@ -467,6 +485,7 @@ lxc_wait_SOURCES = tools/lxc_wait.c \
                   caps.c caps.h \
                   conf.c conf.h \
                   confile.c confile.h \
+                  confile_utils.c confile_utils.h \
                   string_utils.c string_utils.h
 lxc_create_SOURCES = tools/lxc_create.c \
                     tools/arguments.c tools/arguments.h \
@@ -474,6 +493,7 @@ lxc_create_SOURCES = tools/lxc_create.c \
                     caps.c caps.h \
                     conf.c conf.h \
                     confile.c confile.h \
+                    confile_utils.c confile_utils.h \
                     storage/storage_utils.c storage/storage_utils.h \
                     string_utils.c string_utils.h
 lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
@@ -482,6 +502,7 @@ lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
                       caps.c caps.h \
                       conf.c conf.h \
                       confile.c confile.h \
+                      confile_utils.c confile_utils.h \
                       string_utils.c string_utils.h
 lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
                         tools/arguments.c tools/arguments.h \
@@ -489,6 +510,7 @@ lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
                         caps.c caps.h \
                         conf.c conf.h \
                         confile.c confile.h \
+                        confile_utils.c confile_utils.h \
                         string_utils.c string_utils.h
 endif
 
@@ -511,6 +533,7 @@ lxc_monitord_SOURCES = cmd/lxc_monitord.c \
                       caps.c caps.h \
                       conf.c conf.h \
                       confile.c confile.h \
+                      confile_utils.c confile_utils.h \
                       log.c log.h \
                       mainloop.c mainloop.h \
                       monitor.c monitor.h \
@@ -524,6 +547,7 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
                       caps.c caps.h \
                       conf.c conf.h \
                       confile.c confile.h \
+                      confile_utils.c confile_utils.h \
                       log.c log.h \
                       memory_utils.h \
                       network.c network.h \
@@ -539,6 +563,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
                         caps.c caps.h \
                         conf.c conf.h \
                         confile.c confile.h \
+                        confile_utils.c confile_utils.h \
                         file_utils.c file_utils.h \
                         list.h \
                         log.c log.h \
index 7c59deae5a08b62327f19e765a25afc2030373c3..3da1f462a3877d0bf1edb45bb4b9b1a10b0b7dae 100644 (file)
                }                                                       \
        } while (0);
 
-extern int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
-                       unsigned long *hostid, unsigned long *range);
+__hidden extern int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
+                                unsigned long *hostid, unsigned long *range);
 
-extern bool lxc_config_value_empty(const char *value);
-extern struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx,
-                                         bool tail);
-extern struct lxc_netdev *
-lxc_get_netdev_by_idx(struct lxc_conf *conf, unsigned int idx, bool allocate);
-extern void lxc_log_configured_netdevs(const struct lxc_conf *conf);
-extern bool lxc_remove_nic_by_idx(struct lxc_conf *conf, unsigned int idx);
-extern void lxc_free_networks(struct lxc_list *networks);
-extern int lxc_veth_mode_to_flag(int *mode, const char *value);
-extern char *lxc_veth_flag_to_mode(int mode);
-extern int lxc_macvlan_mode_to_flag(int *mode, const char *value);
-extern char *lxc_macvlan_flag_to_mode(int mode);
-extern int lxc_ipvlan_mode_to_flag(int *mode, const char *value);
-extern char *lxc_ipvlan_flag_to_mode(int mode);
-extern int lxc_ipvlan_isolation_to_flag(int *mode, const char *value);
-extern char *lxc_ipvlan_flag_to_isolation(int mode);
+__hidden extern bool lxc_config_value_empty(const char *value);
+__hidden extern struct lxc_netdev *lxc_network_add(struct lxc_list *networks, int idx, bool tail);
+__hidden extern struct lxc_netdev *lxc_get_netdev_by_idx(struct lxc_conf *conf, unsigned int idx,
+                                                        bool allocate);
+__hidden extern void lxc_log_configured_netdevs(const struct lxc_conf *conf);
+__hidden extern bool lxc_remove_nic_by_idx(struct lxc_conf *conf, unsigned int idx);
+__hidden extern void lxc_free_networks(struct lxc_list *networks);
+__hidden extern int lxc_veth_mode_to_flag(int *mode, const char *value);
+__hidden extern char *lxc_veth_flag_to_mode(int mode);
+__hidden extern int lxc_macvlan_mode_to_flag(int *mode, const char *value);
+__hidden extern char *lxc_macvlan_flag_to_mode(int mode);
+__hidden extern int lxc_ipvlan_mode_to_flag(int *mode, const char *value);
+__hidden extern char *lxc_ipvlan_flag_to_mode(int mode);
+__hidden extern int lxc_ipvlan_isolation_to_flag(int *mode, const char *value);
+__hidden extern char *lxc_ipvlan_flag_to_isolation(int mode);
 
-extern int set_config_string_item(char **conf_item, const char *value);
-extern int set_config_string_item_max(char **conf_item, const char *value,
-                                     size_t max)
-__access_r(2, 3);
+__hidden extern int set_config_string_item(char **conf_item, const char *value);
+__hidden extern int set_config_string_item_max(char **conf_item, const char *value, size_t max)
+    __access_r(2, 3);
 
-extern int set_config_path_item(char **conf_item, const char *value);
-extern int set_config_bool_item(bool *conf_item, const char *value,
-                                bool empty_conf_action);
-extern int config_ip_prefix(struct in_addr *addr);
-extern int network_ifname(char *valuep, const char *value, size_t size)
-__access_r(2, 3);
+__hidden extern int set_config_path_item(char **conf_item, const char *value);
+__hidden extern int set_config_bool_item(bool *conf_item, const char *value, bool empty_conf_action);
+__hidden extern int config_ip_prefix(struct in_addr *addr);
+__hidden extern int network_ifname(char *valuep, const char *value, size_t size) __access_r(2, 3);
 
-extern void rand_complete_hwaddr(char *hwaddr);
-extern bool lxc_config_net_is_hwaddr(const char *line);
-extern bool new_hwaddr(char *hwaddr);
-extern int lxc_get_conf_str(char *retv, int inlen, const char *value);
-extern int lxc_get_conf_bool(struct lxc_conf *c, char *retv, int inlen, bool v);
-extern int lxc_get_conf_int(struct lxc_conf *c, char *retv, int inlen, int v);
-extern int lxc_get_conf_size_t(struct lxc_conf *c, char *retv, int inlen, size_t v);
-extern int lxc_get_conf_uint64(struct lxc_conf *c, char *retv, int inlen, uint64_t v);
-extern int lxc_inherit_namespace(const char *lxcname_or_pid,
-                                const char *lxcpath, const char *namespace);
-extern int sig_parse(const char *signame);
+__hidden extern void rand_complete_hwaddr(char *hwaddr);
+__hidden extern bool lxc_config_net_is_hwaddr(const char *line);
+__hidden extern bool new_hwaddr(char *hwaddr);
+__hidden extern int lxc_get_conf_str(char *retv, int inlen, const char *value);
+__hidden extern int lxc_get_conf_bool(struct lxc_conf *c, char *retv, int inlen, bool v);
+__hidden extern int lxc_get_conf_int(struct lxc_conf *c, char *retv, int inlen, int v);
+__hidden extern int lxc_get_conf_size_t(struct lxc_conf *c, char *retv, int inlen, size_t v);
+__hidden extern int lxc_get_conf_uint64(struct lxc_conf *c, char *retv, int inlen, uint64_t v);
+__hidden extern int lxc_inherit_namespace(const char *lxcname_or_pid, const char *lxcpath,
+                                         const char *namespace);
+__hidden extern int sig_parse(const char *signame);
 
 #endif /* __LXC_CONFILE_UTILS_H */
index 78a7b1aa0055f1014d4fe30d7e839784e6313be6..bdf8fdcce652fc2c19c2f2624c8e213d44ebf341 100644 (file)
@@ -13,6 +13,7 @@ lxc_test_cgpath_SOURCES = cgpath.c \
                          ../lxc/commands_utils.c ../lxc/commands_utils.h \
                          ../lxc/conf.c ../lxc/conf.h \
                          ../lxc/confile.c ../lxc/confile.h \
+                         ../lxc/confile_utils.c ../lxc/confile_utils.h \
                          ../lxc/network.c ../lxc/network.h \
                          ../lxc/nl.c ../lxc/nl.h \
                          ../lxc/string_utils.c ../lxc/string_utils.h
@@ -22,8 +23,11 @@ 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/commands.c ../lxc/commands.h \
+                                    ../lxc/commands_utils.c ../lxc/commands_utils.h \
                                     ../lxc/conf.c ../lxc/conf.h \
                                     ../lxc/confile.c ../lxc/confile.h \
+                                    ../lxc/confile_utils.c ../lxc/confile_utils.h \
                                     ../lxc/network.c ../lxc/network.h \
                                     ../lxc/nl.c ../lxc/nl.h \
                                     ../lxc/string_utils.c ../lxc/string_utils.h
@@ -43,7 +47,15 @@ lxc_test_lxcpath_SOURCES = lxcpath.c
 lxc_test_may_control_SOURCES = may_control.c
 lxc_test_mount_injection_SOURCES = mount_injection.c lxctest.h
 lxc_test_parse_config_file_SOURCES = parse_config_file.c \
-                                    lxctest.h
+                                    lxctest.h \
+                                    ../lxc/af_unix.c ../lxc/af_unix.h \
+                                    ../lxc/caps.c ../lxc/caps.h \
+                                    ../lxc/conf.c ../lxc/conf.h \
+                                    ../lxc/confile.c ../lxc/confile.h \
+                                    ../lxc/confile_utils.c ../lxc/confile_utils.h \
+                                    ../lxc/network.c ../lxc/network.h \
+                                    ../lxc/nl.c ../lxc/nl.h \
+                                    ../lxc/string_utils.c ../lxc/string_utils.h
 lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
                             lxctest.h \
                             ../lxc/namespace.c ../lxc/namespace.h \
@@ -62,8 +74,18 @@ lxc_test_startone_SOURCES = startone.c
 lxc_test_state_server_SOURCES = state_server.c \
                                lxctest.h \
                                ../lxc/compiler.h
-lxc_test_utils_SOURCES = lxc-test-utils.c lxctest.h \
-                        ../lxc/string_utils.c ../lxc/string_utils.h
+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/commands.c ../lxc/commands.h \
+                         ../lxc/commands_utils.c ../lxc/commands_utils.h \
+                         ../lxc/conf.c ../lxc/conf.h \
+                         ../lxc/confile.c ../lxc/confile.h \
+                         ../lxc/confile_utils.c ../lxc/confile_utils.h \
+                         ../lxc/network.c ../lxc/network.h \
+                         ../lxc/nl.c ../lxc/nl.h \
+                         ../lxc/string_utils.c ../lxc/string_utils.h
 
 AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
          -DLXCPATH=\"$(LXCPATH)\" \