conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
rexec.c rexec.h \
string_utils.c string_utils.h
lxc_autostart_SOURCES = tools/lxc_autostart.c \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_config_SOURCES = tools/lxc_config.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_console_SOURCES = tools/lxc_console.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_destroy_SOURCES = tools/lxc_destroy.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_device_SOURCES = tools/lxc_device.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_execute_SOURCES = tools/lxc_execute.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_freeze_SOURCES = tools/lxc_freeze.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_info_SOURCES = tools/lxc_info.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_monitor_SOURCES = tools/lxc_monitor.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
macro.h \
string_utils.c string_utils.h
lxc_ls_SOURCES = tools/lxc_ls.c \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
memory_utils.h \
string_utils.c string_utils.h
lxc_copy_SOURCES = tools/lxc_copy.c \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
storage/storage_utils.c storage/storage_utils.h \
string_utils.c string_utils.h
lxc_start_SOURCES = tools/lxc_start.c \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_stop_SOURCES = tools/lxc_stop.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_top_SOURCES = tools/lxc_top.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_unshare_SOURCES = tools/lxc_unshare.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h \
syscall_numbers.h \
syscall_wrappers.h
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_create_SOURCES = tools/lxc_create.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
storage/storage_utils.c storage/storage_utils.h \
string_utils.c string_utils.h
lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
tools/arguments.c tools/arguments.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
string_utils.c string_utils.h
endif
compiler.h \
error.c error.h \
initutils.c initutils.h \
+ file_utils.c file_utils.h \
memory_utils.h \
parse.c parse.h \
process_utils.c process_utils.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
log.c log.h \
mainloop.c mainloop.h \
monitor.c monitor.h \
conf.c conf.h \
confile.c confile.h \
confile_utils.c confile_utils.h \
+ file_utils.c file_utils.h \
log.c log.h \
memory_utils.h \
network.c network.h \
parse.c parse.h \
process_utils.c process_utils.h \
syscall_numbers.h \
- file_utils.c file_utils.h \
string_utils.c string_utils.h \
syscall_wrappers.h
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
#include "compiler.h"
/* read and write whole files */
-extern int lxc_write_to_file(const char *filename, const void *buf,
- size_t count, bool add_newline, mode_t mode)
-__access_r(2, 3);
+__hidden extern int lxc_write_to_file(const char *filename, const void *buf, size_t count,
+ bool add_newline, mode_t mode) __access_r(2, 3);
-extern int lxc_readat(int dirfd, const char *filename, void *buf, size_t count)
-__access_w(3, 4);
+__hidden extern int lxc_readat(int dirfd, const char *filename, void *buf, size_t count)
+ __access_w(3, 4);
-extern int lxc_writeat(int dirfd, const char *filename, const void *buf,
- size_t count)
-__access_r(3, 4);
+__hidden extern int lxc_writeat(int dirfd, const char *filename, const void *buf, size_t count)
+ __access_r(3, 4);
-extern int lxc_write_openat(const char *dir, const char *filename,
- const void *buf, size_t count)
-__access_r(3, 4);
+__hidden extern int lxc_write_openat(const char *dir, const char *filename, const void *buf,
+ size_t count) __access_r(3, 4);
-extern int lxc_read_from_file(const char *filename, void *buf, size_t count)
-__access_w(2, 3);
+__hidden extern int lxc_read_from_file(const char *filename, void *buf, size_t count)
+ __access_w(2, 3);
/* send and receive buffers completely */
-extern ssize_t lxc_write_nointr(int fd, const void *buf, size_t count)
-__access_r(2, 3);
+__hidden extern ssize_t lxc_write_nointr(int fd, const void *buf, size_t count) __access_r(2, 3);
-extern ssize_t lxc_pwrite_nointr(int fd, const void *buf, size_t count,
- off_t offset)
-__access_r(2, 3);
+__hidden extern ssize_t lxc_pwrite_nointr(int fd, const void *buf, size_t count, off_t offset)
+ __access_r(2, 3);
-extern ssize_t lxc_send_nointr(int sockfd, void *buf, size_t len, int flags)
-__access_r(2, 3);
+__hidden extern ssize_t lxc_send_nointr(int sockfd, void *buf, size_t len, int flags)
+ __access_r(2, 3);
-extern ssize_t lxc_read_nointr(int fd, void *buf, size_t count)
-__access_w(2, 3);
+__hidden extern ssize_t lxc_read_nointr(int fd, void *buf, size_t count) __access_w(2, 3);
-extern ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count,
- const void *expected_buf)
-__access_w(2, 3);
+__hidden extern ssize_t lxc_read_nointr_expect(int fd, void *buf, size_t count,
+ const void *expected_buf) __access_w(2, 3);
-extern ssize_t lxc_read_file_expect(const char *path, void *buf, size_t count,
- const void *expected_buf)
-__access_w(2, 3);
+__hidden extern ssize_t lxc_read_file_expect(const char *path, void *buf, size_t count,
+ const void *expected_buf) __access_w(2, 3);
-extern ssize_t lxc_recv_nointr(int sockfd, void *buf, size_t len, int flags)
-__access_w(2, 3);
+__hidden extern ssize_t lxc_recv_nointr(int sockfd, void *buf, size_t len, int flags)
+ __access_w(2, 3);
-ssize_t lxc_recvmsg_nointr_iov(int sockfd, struct iovec *iov, size_t iovlen,
- int flags);
+__hidden extern ssize_t lxc_recvmsg_nointr_iov(int sockfd, struct iovec *iov, size_t iovlen,
+ int flags);
-extern bool file_exists(const char *f);
-extern int print_to_file(const char *file, const char *content);
-extern int is_dir(const char *path);
-extern int lxc_count_file_lines(const char *fn);
-extern int lxc_make_tmpfile(char *template, bool rm);
+__hidden extern bool file_exists(const char *f);
+__hidden extern int print_to_file(const char *file, const char *content);
+__hidden extern int is_dir(const char *path);
+__hidden extern int lxc_count_file_lines(const char *fn);
+__hidden extern int lxc_make_tmpfile(char *template, bool rm);
/* __typeof__ should be safe to use with all compilers. */
typedef __typeof__(((struct statfs *)NULL)->f_type) fs_type_magic;
-extern bool has_fs_type(const char *path, fs_type_magic magic_val);
-extern bool fhas_fs_type(int fd, fs_type_magic magic_val);
-extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
-extern FILE *fopen_cloexec(const char *path, const char *mode);
-extern ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset,
- size_t count);
-extern char *file_to_buf(const char *path, size_t *length);
-extern int fd_to_buf(int fd, char **buf, size_t *length);
-extern int fd_to_fd(int from, int to);
-extern int lxc_open_dirfd(const char *dir);
-extern FILE *fdopen_cached(int fd, const char *mode, void **caller_freed_buffer);
-extern FILE *fopen_cached(const char *path, const char *mode,
- void **caller_freed_buffer);
-extern int timens_offset_write(clockid_t clk_id, int64_t s_offset, int64_t ns_offset);
+__hidden extern bool has_fs_type(const char *path, fs_type_magic magic_val);
+__hidden extern bool fhas_fs_type(int fd, fs_type_magic magic_val);
+__hidden extern bool is_fs_type(const struct statfs *fs, fs_type_magic magic_val);
+__hidden extern FILE *fopen_cloexec(const char *path, const char *mode);
+__hidden extern ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset, size_t count);
+__hidden extern char *file_to_buf(const char *path, size_t *length);
+__hidden extern int fd_to_buf(int fd, char **buf, size_t *length);
+__hidden extern int fd_to_fd(int from, int to);
+__hidden extern int lxc_open_dirfd(const char *dir);
+__hidden extern FILE *fdopen_cached(int fd, const char *mode, void **caller_freed_buffer);
+__hidden extern FILE *fopen_cached(const char *path, const char *mode, void **caller_freed_buffer);
+__hidden extern int timens_offset_write(clockid_t clk_id, int64_t s_offset, int64_t ns_offset);
#endif /* __LXC_FILE_UTILS_H */
LDADD = ../lxc/liblxc.la
-lxc_test_api_reboot_SOURCES = api_reboot.c
+lxc_test_api_reboot_SOURCES = api_reboot.c \
+ ../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/file_utils.c ../lxc/file_utils.h \
+ ../lxc/network.c ../lxc/network.h \
+ ../lxc/nl.c ../lxc/nl.h \
+ ../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_apparmor_SOURCES = aa.c
-lxc_test_attach_SOURCES = attach.c
+lxc_test_attach_SOURCES = attach.c \
+ ../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/file_utils.c ../lxc/file_utils.h \
+ ../lxc/network.c ../lxc/network.h \
+ ../lxc/nl.c ../lxc/nl.h \
+ ../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_basic_SOURCES = basic.c
lxc_test_cgpath_SOURCES = cgpath.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/conf.c ../lxc/conf.h \
../lxc/confile.c ../lxc/confile.h \
../lxc/confile_utils.c ../lxc/confile_utils.h \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/network.c ../lxc/network.h \
../lxc/nl.c ../lxc/nl.h \
../lxc/string_utils.c ../lxc/string_utils.h
../lxc/conf.c ../lxc/conf.h \
../lxc/confile.c ../lxc/confile.h \
../lxc/confile_utils.c ../lxc/confile_utils.h \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/network.c ../lxc/network.h \
../lxc/nl.c ../lxc/nl.h \
../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_locktests_SOURCES = locktests.c
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_mount_injection_SOURCES = mount_injection.c \
+ lxctest.h \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
+ ../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_parse_config_file_SOURCES = parse_config_file.c \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/conf.c ../lxc/conf.h \
../lxc/confile.c ../lxc/confile.h \
../lxc/confile_utils.c ../lxc/confile_utils.h \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/network.c ../lxc/network.h \
../lxc/nl.c ../lxc/nl.h \
../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_share_ns_SOURCES = share_ns.c \
lxctest.h \
../lxc/compiler.h
-lxc_test_shortlived_SOURCES = shortlived.c
+lxc_test_shortlived_SOURCES = shortlived.c \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
+ ../lxc/string_utils.c ../lxc/string_utils.h
lxc_test_shutdowntest_SOURCES = shutdowntest.c
lxc_test_snapshot_SOURCES = snapshot.c
lxc_test_startone_SOURCES = startone.c
../lxc/conf.c ../lxc/conf.h \
../lxc/confile.c ../lxc/confile.h \
../lxc/confile_utils.c ../lxc/confile_utils.h \
+ ../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/network.c ../lxc/network.h \
../lxc/nl.c ../lxc/nl.h \
../lxc/string_utils.c ../lxc/string_utils.h