shared: include what we use
The next step of a general cleanup of our includes. This one mostly adds missing includes but there are a few removals as well.
This commit is contained in:
parent
8eb3655cdb
commit
a8fbdf5424
|
@ -19,9 +19,10 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -30,7 +31,6 @@
|
|||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
struct acpi_table_header {
|
||||
char signature[4];
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "apparmor-util.h"
|
||||
#include "fileio.h"
|
||||
#include "parse-util.h"
|
||||
#include "util.h"
|
||||
|
||||
bool mac_apparmor_use(void) {
|
||||
static int cached_use = -1;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <sys/utsname.h>
|
||||
|
||||
#include "architecture.h"
|
||||
#include "macro.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <endian.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "util.h"
|
||||
|
||||
/* A cleaned up architecture definition. We don't want to get lost in
|
||||
|
|
|
@ -21,13 +21,22 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/signalfd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
@ -38,6 +47,8 @@
|
|||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "io-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "random-util.h"
|
||||
|
@ -46,6 +57,7 @@
|
|||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "time-util.h"
|
||||
#include "umask-util.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "acpi-fpdt.h"
|
||||
#include "boot-timestamps.h"
|
||||
#include "efivars.h"
|
||||
#include "macro.h"
|
||||
#include "time-util.h"
|
||||
|
||||
int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader) {
|
||||
usec_t x = 0, y = 0, a;
|
||||
|
|
|
@ -19,14 +19,24 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-bus-protocol.h"
|
||||
#include "sd-bus.h"
|
||||
#include "sd-daemon.h"
|
||||
#include "sd-event.h"
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-internal.h"
|
||||
#include "bus-label.h"
|
||||
#include "bus-message.h"
|
||||
|
@ -35,7 +45,12 @@
|
|||
#include "def.h"
|
||||
#include "env-util.h"
|
||||
#include "escape.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "install.h"
|
||||
#include "kdbus.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "parse-util.h"
|
||||
|
@ -49,6 +64,7 @@
|
|||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "syslog-util.h"
|
||||
#include "time-util.h"
|
||||
#include "unit-name.h"
|
||||
#include "user-util.h"
|
||||
#include "utf8.h"
|
||||
|
|
|
@ -21,11 +21,18 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sd-bus-vtable.h"
|
||||
#include "sd-bus.h"
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "install.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@
|
|||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
|
@ -31,11 +33,11 @@
|
|||
#include "formats-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "macro.h"
|
||||
#include "output-mode.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
#include "string-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static int compare(const void *a, const void *b) {
|
||||
const pid_t *p = a, *q = b;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <sys/types.h>
|
||||
|
||||
#include "logs-show.h"
|
||||
#include "output-mode.h"
|
||||
|
||||
int show_cgroup_by_path(const char *path, const char *prefix, unsigned columns, bool kernel_threads, OutputFlags flags);
|
||||
int show_cgroup(const char *controller, const char *path, const char *prefix, unsigned columns, bool kernel_threads, OutputFlags flags);
|
||||
|
|
|
@ -20,22 +20,29 @@
|
|||
***/
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <mqueue.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "clean-ipc.h"
|
||||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "formats-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "util.h"
|
||||
|
||||
static int clean_sysvipc_shm(uid_t delete_uid) {
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
|
|
|
@ -20,9 +20,13 @@
|
|||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fnmatch.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
@ -38,6 +42,8 @@
|
|||
#include "glob-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "ima-util.h"
|
||||
#include "list.h"
|
||||
#include "macro.h"
|
||||
#include "mount-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
|
|
|
@ -20,15 +20,17 @@
|
|||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "sd-messages.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "log.h"
|
||||
|
@ -40,8 +42,8 @@
|
|||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "syslog-util.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
#include "util.h"
|
||||
|
||||
int config_item_table_lookup(
|
||||
const void *table,
|
||||
|
|
|
@ -21,9 +21,14 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
|
||||
/* An abstract parser for simple, line based, shallow configuration
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "alloc-util.h"
|
||||
#include "dev-setup.h"
|
||||
#include "label.h"
|
||||
#include "log.h"
|
||||
#include "path-util.h"
|
||||
#include "user-util.h"
|
||||
#include "util.h"
|
||||
|
|
|
@ -24,9 +24,18 @@
|
|||
#include <stringprep.h>
|
||||
#endif
|
||||
|
||||
#include <endian.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dns-domain.h"
|
||||
#include "hashmap.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "macro.h"
|
||||
#include "parse-util.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "in-addr-util.h"
|
||||
|
||||
|
|
|
@ -19,17 +19,27 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "dropin.h"
|
||||
#include "escape.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio-label.h"
|
||||
#include "hashmap.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
#include "set.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "util.h"
|
||||
#include "unit-name.h"
|
||||
|
||||
int drop_in_file(const char *dir, const char *unit, unsigned level,
|
||||
const char *name, char **_p, char **_q) {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "macro.h"
|
||||
#include "set.h"
|
||||
#include "unit-name.h"
|
||||
|
|
|
@ -19,17 +19,27 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "dirent-util.h"
|
||||
#include "efivars.h"
|
||||
#include "fd-util.h"
|
||||
#include "io-util.h"
|
||||
#include "macro.h"
|
||||
#include "parse-util.h"
|
||||
#include "stdio-util.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
#include "util.h"
|
||||
#include "virt.h"
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
|
|
|
@ -19,9 +19,14 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <alloca.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netfilter_ipv4/ip_tables.h>
|
||||
#include <linux/netfilter/nf_nat.h>
|
||||
#include <linux/netfilter/xt_addrtype.h>
|
||||
|
@ -29,7 +34,8 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "firewall-util.h"
|
||||
#include "util.h"
|
||||
#include "in-addr-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free);
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "in-addr-util.h"
|
||||
|
||||
#ifdef HAVE_LIBIPTC
|
||||
|
|
|
@ -19,9 +19,16 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <mntent.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "device-nodes.h"
|
||||
#include "fstab-util.h"
|
||||
#include "macro.h"
|
||||
#include "mount-util.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
|
@ -28,11 +29,13 @@
|
|||
#include "fileio.h"
|
||||
#include "fstab-util.h"
|
||||
#include "generator.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-util.h"
|
||||
#include "path-util.h"
|
||||
#include "special.h"
|
||||
#include "string-util.h"
|
||||
#include "time-util.h"
|
||||
#include "unit-name.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
|
@ -19,9 +19,14 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs-util.h"
|
||||
#include "import-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "path-util.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -19,15 +19,18 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "formats-util.h"
|
||||
#include "install-printf.h"
|
||||
#include "install.h"
|
||||
#include "macro.h"
|
||||
#include "specifier.h"
|
||||
#include "unit-name.h"
|
||||
#include "user-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) {
|
||||
UnitFileInstallInfo *i = userdata;
|
||||
|
|
|
@ -19,22 +19,31 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fnmatch.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "dirent-util.h"
|
||||
#include "extract-word.h"
|
||||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "install-printf.h"
|
||||
#include "install.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-lookup.h"
|
||||
#include "path-util.h"
|
||||
|
@ -45,7 +54,6 @@
|
|||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "unit-name.h"
|
||||
#include "util.h"
|
||||
|
||||
#define UNIT_FILE_FOLLOW_SYMLINK_MAX 64
|
||||
|
||||
|
|
|
@ -30,7 +30,10 @@ typedef struct UnitFileChange UnitFileChange;
|
|||
typedef struct UnitFileList UnitFileList;
|
||||
typedef struct UnitFileInstallInfo UnitFileInstallInfo;
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "macro.h"
|
||||
#include "path-lookup.h"
|
||||
#include "strv.h"
|
||||
#include "unit-name.h"
|
||||
|
|
|
@ -21,9 +21,17 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <syslog.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
#include "sd-journal.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
|
@ -34,11 +42,15 @@
|
|||
#include "journal-internal.h"
|
||||
#include "log.h"
|
||||
#include "logs-show.h"
|
||||
#include "macro.h"
|
||||
#include "output-mode.h"
|
||||
#include "parse-util.h"
|
||||
#include "process-util.h"
|
||||
#include "sparse-endian.h"
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
|
@ -22,11 +22,15 @@
|
|||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "sd-journal.h"
|
||||
|
||||
#include "macro.h"
|
||||
#include "output-mode.h"
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
int output_journal(
|
||||
|
|
|
@ -19,10 +19,15 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/fs.h>
|
||||
#include <sys/statfs.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs-util.h"
|
||||
#include "chattr-util.h"
|
||||
|
@ -30,6 +35,10 @@
|
|||
#include "dirent-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "hashmap.h"
|
||||
#include "lockfile-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "machine-image.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
|
@ -37,7 +46,9 @@
|
|||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
#include "utf8.h"
|
||||
#include "util.h"
|
||||
#include "xattr-util.h"
|
||||
|
||||
static const char image_search_path[] =
|
||||
|
|
|
@ -21,8 +21,12 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "lockfile-util.h"
|
||||
#include "macro.h"
|
||||
#include "time-util.h"
|
||||
|
||||
typedef enum ImageType {
|
||||
|
|
|
@ -19,10 +19,23 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/loop.h>
|
||||
#include <signal.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statfs.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-bus-protocol.h"
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "btrfs-util.h"
|
||||
|
@ -30,7 +43,10 @@
|
|||
#include "fileio.h"
|
||||
#include "fs-util.h"
|
||||
#include "lockfile-util.h"
|
||||
#include "log.h"
|
||||
#include "machine-pool.h"
|
||||
#include "macro.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "mount-util.h"
|
||||
#include "parse-util.h"
|
||||
|
@ -39,7 +55,6 @@
|
|||
#include "signal-util.h"
|
||||
#include "stat-util.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
#define VAR_LIB_MACHINES_SIZE_START (1024UL*1024UL*500UL)
|
||||
#define VAR_LIB_MACHINES_FREE_MIN (1024UL*1024UL*750UL)
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "sd-bus.h"
|
||||
|
||||
/* Grow the /var/lib/machines directory after each 10MiB written */
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/prctl.h>
|
||||
|
@ -28,13 +32,13 @@
|
|||
#include "copy.h"
|
||||
#include "fd-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "pager.h"
|
||||
#include "process-util.h"
|
||||
#include "signal-util.h"
|
||||
#include "string-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static pid_t pager_pid = 0;
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "alloc-util.h"
|
||||
#include "install.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "path-lookup.h"
|
||||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct LookupPaths {
|
||||
|
|
|
@ -19,15 +19,27 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "ptyfwd.h"
|
||||
#include "util.h"
|
||||
#include "time-util.h"
|
||||
|
||||
struct PTYForward {
|
||||
sd_event *event;
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "sd-event.h"
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
typedef struct PTYForward PTYForward;
|
||||
|
||||
typedef enum PTYForwardFlags {
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <seccomp.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "seccomp-util.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
const char* seccomp_arch_to_string(uint32_t c) {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
***/
|
||||
|
||||
#include <seccomp.h>
|
||||
#include <stdint.h>
|
||||
|
||||
const char* seccomp_arch_to_string(uint32_t c);
|
||||
int seccomp_arch_from_string(const char *n, uint32_t *ret);
|
||||
|
|
|
@ -19,7 +19,13 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-parser.h"
|
||||
|
@ -27,11 +33,11 @@
|
|||
#include "fd-util.h"
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "parse-util.h"
|
||||
#include "sleep-config.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "util.h"
|
||||
|
||||
#define USE(x, y) do{ (x) = (y); (y) = NULL; } while(0)
|
||||
|
||||
|
|
|
@ -28,9 +28,11 @@
|
|||
#include "fd-util.h"
|
||||
#include "io-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "process-util.h"
|
||||
#include "spawn-polkit-agent.h"
|
||||
#include "stdio-util.h"
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef ENABLE_POLKIT
|
||||
|
|
|
@ -19,15 +19,20 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#include "sd-id128.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "hostname-util.h"
|
||||
#include "macro.h"
|
||||
#include "specifier.h"
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
/*
|
||||
* Generic infrastructure for replacing %x style specifiers in
|
||||
|
|
|
@ -21,14 +21,16 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "base-filesystem.h"
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "path-util.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
/***
|
||||
This file is part of systemd.
|
||||
|
||||
|
|
|
@ -19,19 +19,14 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "fileio.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "string-util.h"
|
||||
#include "sysctl-util.h"
|
||||
#include "util.h"
|
||||
|
||||
char *sysctl_normalize(char *s) {
|
||||
char *n;
|
||||
|
|
|
@ -19,9 +19,13 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "macro.h"
|
||||
#include "uid-range.h"
|
||||
#include "user-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
|
||||
assert(range);
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
#include <utmpx.h>
|
||||
|
@ -34,7 +38,9 @@
|
|||
#include "path-util.h"
|
||||
#include "string-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "time-util.h"
|
||||
#include "user-util.h"
|
||||
#include "util.h"
|
||||
#include "utmp-wtmp.h"
|
||||
|
||||
int utmp_get_runlevel(int *runlevel, int *previous) {
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef HAVE_UTMP
|
||||
|
|
|
@ -22,11 +22,13 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/watchdog.h>
|
||||
|
||||
#include "fd-util.h"
|
||||
#include "log.h"
|
||||
#include "time-util.h"
|
||||
#include "watchdog.h"
|
||||
|
||||
static int watchdog_fd = -1;
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "time-util.h"
|
||||
#include "util.h"
|
||||
|
||||
int watchdog_set_timeout(usec_t *usec);
|
||||
|
|
Loading…
Reference in New Issue