]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
log: minimize includes in log.h
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Jan 2018 23:39:12 +0000 (00:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jan 2018 13:44:31 +0000 (14:44 +0100)
log.h really should only include the bare minimum of other headers, as
it is really pulled into pretty much everything else and already in
itself one of the most basic pieces of code we have.

Let's hence drop inclusion of:

1. sd-id128.h because it's entirely unneeded in current log.h
2. errno.h, dito.
3. sys/signalfd.h which we can replace by a simple struct forward
   declaration
4. process-util.h which was needed for getpid_cached() which we now hide
   in a funciton log_emergency_level() instead, which nicely abstracts
   the details away.
5. sys/socket.h which was needed for struct iovec, but a simple struct
   forward declaration suffices for that too.

Ultimately this actually makes our source tree larger (since users of
the functionality above must now include it themselves, log.h won't do
that for them), but I think it helps to untangle our web of includes a
tiny bit.

(Background: I'd like to isolate the generic bits of src/basic/ enough
so that we can do a git submodule import into casync for it)

82 files changed:
src/basic/af-list.h
src/basic/calendarspec.c
src/basic/errno-list.c
src/basic/ether-addr-util.c
src/basic/fs-util.c
src/basic/gunicode.c
src/basic/hash-funcs.c
src/basic/hostname-util.h
src/basic/journal-importer.c
src/basic/log.c
src/basic/log.h
src/basic/process-util.h
src/basic/random-util.c
src/basic/securebits-util.c
src/basic/socket-util.c
src/basic/stat-util.c
src/basic/time-util.c
src/basic/verbs.c
src/boot/bootctl.c
src/core/dbus.c
src/core/locale-setup.c
src/core/umount.c
src/firstboot/firstboot.c
src/import/export.c
src/import/import-common.c
src/import/import.c
src/import/pull.c
src/initctl/initctl.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload.c
src/journal/journald.c
src/journal/sd-journal.c
src/journal/test-compress-benchmark.c
src/libsystemd-network/network-internal.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-ipv4ll.c
src/libsystemd-network/test-lldp.c
src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-gvariant.c
src/libsystemd/sd-bus/bus-signature.c
src/libsystemd/sd-bus/bus-socket.c
src/libsystemd/sd-bus/bus-type.c
src/libsystemd/sd-bus/bus-type.h
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/test-bus-track.c
src/libsystemd/sd-daemon/sd-daemon.c
src/libsystemd/sd-event/test-event.c
src/libsystemd/sd-id128/id128-util.c
src/libsystemd/sd-netlink/sd-netlink.c
src/libsystemd/sd-resolve/sd-resolve.c
src/login/logind-core.c
src/login/logind.c
src/network/netdev/tuntap.c
src/network/netdev/veth.c
src/network/netdev/vlan.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn-setuid.c
src/partition/makefs.c
src/resolve/dns-type.c
src/resolve/test-dns-packet.c
src/shared/bootspec.c
src/shared/dissect-image.c
src/shared/dissect-image.h
src/shared/loop-util.c
src/shared/test-tables.h
src/shared/volatile-util.c
src/test/test-cgroup.c
src/test/test-extract-word.c
src/test/test-hash.c
src/test/test-hexdecoct.c
src/test/test-log.c
src/test/test-ns.c
src/test/test-parse-util.c
src/test/test-signal-util.c
src/test/test-sizeof.c
src/test/test-socket-util.c
src/test/test-tmpfiles.c
src/test/test-util.c
src/test/test-watchdog.c
src/udev/udevadm-control.c
src/veritysetup/veritysetup-generator.c
src/veritysetup/veritysetup.c

index 65656022cc712e221d77960a1d42da30bc65c7ea..1684bc6a0f3333b5e2fc9271248a05b8fa1074c6 100644 (file)
@@ -20,6 +20,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <sys/socket.h>
+
 #include "string-util.h"
 
 const char *af_to_name(int id);
index d1ba1681fbc48955921931d915118dc01db806a0..fd7802277321d05a13e5052551a7d040d07fc14d 100644 (file)
@@ -35,6 +35,7 @@
 #include "fileio.h"
 #include "macro.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "time-util.h"
 
index d8eedfc0adbcdc600ac27e514003ad1a999a5b18..7eb28b8fd1fceef287364ec7814cd3de3a4c7252 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <string.h>
 
 #include "errno-list.h"
index bbe8bf000656c9506b6ea48ae9c4c58ab9e9046e..bfbd1a4931aa2e87efab6f0989b8dbcbc63c2398 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <net/ethernet.h>
 #include <stdio.h>
 #include <sys/types.h>
index 16f97893c951cd1f5024e56033a30111348453c5..57d22b8abbe68d7cc4dd10f79dba355d43f73e98 100644 (file)
@@ -39,6 +39,7 @@
 #include "mkdir.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "stat-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
index e6ac0545a4efc5c0e0d5fc3d0c34c71eda0a53f5..8aff4a0fc509b8b1fead206a5f4f501ac1788130 100644 (file)
@@ -4,8 +4,6 @@
  *  Copyright 2000, 2005 Red Hat, Inc.
  */
 
-#include <stdlib.h>
-
 #include "gunicode.h"
 
 #define unichar uint32_t
index e69f81558dd7aa3120589935b5ac4a64e735e010..5267758769c94aaff3fe87738ca4626c1077cb1d 100644 (file)
@@ -19,6 +19,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <string.h>
+
 #include "hash-funcs.h"
 
 void string_hash_func(const void *p, struct siphash *state) {
index d837d6f28c5dd061ff1cdce08f1c7e679caf8ddf..edae52e3dbd63c6efbfb915d4c6e6da07f951397 100644 (file)
@@ -21,6 +21,7 @@
 ***/
 
 #include <stdbool.h>
+#include <stdio.h>
 
 #include "macro.h"
 
index 6942c370cb60d2bdc7690a1835ebb7417321732a..11054589e32be0b783aac732ec9768d534628f51 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <unistd.h>
 
 #include "alloc-util.h"
index 20d9588e2f34b41870e80031c6c736125b705bbd..b1b448662715ac086fa6bb3068be83382fc2b560 100644 (file)
@@ -1239,7 +1239,6 @@ void log_received_signal(int level, const struct signalfd_siginfo *si) {
                 log_full(level,
                          "Received SIG%s.",
                          signal_to_string(si->ssi_signo));
-
 }
 
 int log_syntax_internal(
@@ -1300,3 +1299,10 @@ void log_set_always_reopen_console(bool b) {
 void log_set_open_when_needed(bool b) {
         open_when_needed = b;
 }
+
+int log_emergency_level(void) {
+        /* Returns the log level to use for log_emergency() logging. We use LOG_EMERG only when we are PID 1, as only
+         * then the system of the whole system is obviously affected. */
+
+        return getpid_cached() == 1 ? LOG_EMERG : LOG_ERR;
+}
index 28300312f628586f2a520ee6befdd6fa9c2d3d65..a731c751531c07bfd8ae146f44470e97ad71ce30 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <errno.h>
 #include <stdarg.h>
 #include <stdbool.h>
 #include <stdlib.h>
-#include <sys/signalfd.h>
-#include <sys/socket.h>
 #include <syslog.h>
 
-#include "sd-id128.h"
-
 #include "macro.h"
-#include "process-util.h"
+
+/* Some structures we reference but don't want to pull in headers for */
+struct iovec;
+struct signalfd_siginfo;
 
 typedef enum LogRealm {
         LOG_REALM_SYSTEMD,
@@ -194,7 +192,7 @@ int log_struct_iovec_internal(
                 const char *file,
                 int line,
                 const char *func,
-                const struct iovec input_iovec[],
+                const struct iovec *input_iovec,
                 size_t n_input_iovec);
 
 /* This modifies the buffer passed! */
@@ -252,13 +250,15 @@ void log_assert_failed_return_realm(
 
 #define log_full(level, ...) log_full_errno((level), 0, __VA_ARGS__)
 
+int log_emergency_level(void);
+
 /* Normal logging */
 #define log_debug(...)     log_full(LOG_DEBUG,   __VA_ARGS__)
 #define log_info(...)      log_full(LOG_INFO,    __VA_ARGS__)
 #define log_notice(...)    log_full(LOG_NOTICE,  __VA_ARGS__)
 #define log_warning(...)   log_full(LOG_WARNING, __VA_ARGS__)
 #define log_error(...)     log_full(LOG_ERR,     __VA_ARGS__)
-#define log_emergency(...) log_full(getpid_cached() == 1 ? LOG_EMERG : LOG_ERR, __VA_ARGS__)
+#define log_emergency(...) log_full(log_emergency_level(), __VA_ARGS__)
 
 /* Logging triggered by an errno-like error */
 #define log_debug_errno(error, ...)     log_full_errno(LOG_DEBUG,   error, __VA_ARGS__)
@@ -266,7 +266,7 @@ void log_assert_failed_return_realm(
 #define log_notice_errno(error, ...)    log_full_errno(LOG_NOTICE,  error, __VA_ARGS__)
 #define log_warning_errno(error, ...)   log_full_errno(LOG_WARNING, error, __VA_ARGS__)
 #define log_error_errno(error, ...)     log_full_errno(LOG_ERR,     error, __VA_ARGS__)
-#define log_emergency_errno(error, ...) log_full_errno(getpid_cached() == 1 ? LOG_EMERG : LOG_ERR, error, __VA_ARGS__)
+#define log_emergency_errno(error, ...) log_full_errno(log_emergency_level(), error, __VA_ARGS__)
 
 #ifdef LOG_TRACE
 #  define log_trace(...) log_debug(__VA_ARGS__)
index fdb1790b2ecb65a188439905ad3047899542f39b..267888a625084a5b89422873c8babbab4a45fa7c 100644 (file)
@@ -21,6 +21,7 @@
 ***/
 
 #include <alloca.h>
+#include <errno.h>
 #include <sched.h>
 #include <signal.h>
 #include <stdbool.h>
index 1bc8000896662d2166f111ccf1348c608b6c2f4f..7457815fa2849edbee4751ea3e54552321e4c02a 100644 (file)
 #include <elf.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <linux/random.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/time.h>
-#include <linux/random.h>
-#include <stdint.h>
 
 #if HAVE_SYS_AUXV_H
 #  include <sys/auxv.h>
index b5f6418a6c10882ec3d8ac64955b1446dc141c51..441d386f9e1f359c880d3f41e3510c4159208538 100644 (file)
@@ -19,6 +19,7 @@
 ***/
 
 #include <errno.h>
+#include <stdio.h>
 
 #include "alloc-util.h"
 #include "extract-word.h"
index d6371f833d4546cc055a4d7822919c1689ac832d..2c70cade14dceaacde7fcc18b9a6159467429063 100644 (file)
@@ -41,6 +41,7 @@
 #include "missing.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "socket-util.h"
 #include "string-table.h"
 #include "string-util.h"
index 96fc8b3787233fe0f68c92b5dbb66d41723dbd0d..3a54103f1beb46bbbf7d565509d2962e5fa6ba17 100644 (file)
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
 #include <linux/magic.h>
+#include <sched.h>
+#include <sys/stat.h>
 #include <sys/statvfs.h>
+#include <sys/types.h>
 #include <unistd.h>
 
 #include "dirent-util.h"
index cbb5285018f0667f6667d64e6aa6b41c4d490d49..4a341e208fb97e1a985aad9ddda91a66835972c7 100644 (file)
@@ -38,6 +38,7 @@
 #include "macro.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
index 556acdcaa3a877d523c20fa1205f21ccf80bd75e..47644670da6b5caa4ecc677f6e0a88c11c64b24e 100644 (file)
 #include <getopt.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <string.h>
 
 #include "env-util.h"
 #include "log.h"
 #include "macro.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "verbs.h"
 #include "virt.h"
index 48fdf97c7fd6ac0b5c753f43df8067b9eb417269..1cc77e29f9d350afd6c38c5a36e6bd71fb32c340 100644 (file)
@@ -36,6 +36,8 @@
 #include <sys/statfs.h>
 #include <unistd.h>
 
+#include "sd-id128.h"
+
 #include "alloc-util.h"
 #include "blkid-util.h"
 #include "bootspec.h"
index 5e8a2999838252c205d3501cf885e1c92cbf0233..258f4c637932beebfd4c9f7e1b8ed0298407c8f3 100644 (file)
@@ -41,6 +41,7 @@
 #include "log.h"
 #include "missing.h"
 #include "mkdir.h"
+#include "process-util.h"
 #include "selinux-access.h"
 #include "special.h"
 #include "string-util.h"
index 6240a83197ae13866e8313e66b6c0fb87a55f68d..0c43cf2418a29e5a0df6a42fa45a87f1e2a82bf0 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "env-util.h"
 #include "fileio.h"
index 6b0100fb44992e3eb8701233c0bd210af90d31c4..731436af27ca03a0bbc08e1aa9c5ee911b929044 100644 (file)
@@ -38,6 +38,7 @@
 #include "mount-setup.h"
 #include "mount-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "signal-util.h"
 #include "string-util.h"
 #include "udev-util.h"
index 207ddeb70f11ec17178073698ee9e431167403b8..1dbceb8803add6963b2ca2671d9441bd40db3555 100644 (file)
@@ -23,6 +23,8 @@
 #include <shadow.h>
 #include <unistd.h>
 
+#include "sd-id128.h"
+
 #include "alloc-util.h"
 #include "ask-password-api.h"
 #include "copy.h"
index 753d1399f57271b19eea3c600204ff032773a676..0f32b90051984c83b8cc008ca2dd158a780bb3fc 100644 (file)
@@ -21,6 +21,7 @@
 #include <getopt.h>
 
 #include "sd-event.h"
+#include "sd-id128.h"
 
 #include "alloc-util.h"
 #include "export-raw.h"
index aa7ab974d250bf958c0360a509be5393c22d92b6..c24a0b0c86b94c6939ffdcaff425c47523a9a2e2 100644 (file)
@@ -27,6 +27,7 @@
 #include "capability-util.h"
 #include "fd-util.h"
 #include "import-common.h"
+#include "process-util.h"
 #include "signal-util.h"
 #include "util.h"
 
index cc454ee15b5547d83940ba340a914aaff6d53e7d..454e64e3cb3c2f3af78b97f939fc5fac5a9395f0 100644 (file)
@@ -21,6 +21,7 @@
 #include <getopt.h>
 
 #include "sd-event.h"
+#include "sd-id128.h"
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 46e0fd5acbe6dcfa798131ecbf5bbee1f174ac68..325f7e3d50e88ba12734600fa00756292f258916 100644 (file)
@@ -21,6 +21,7 @@
 #include <getopt.h>
 
 #include "sd-event.h"
+#include "sd-id128.h"
 
 #include "alloc-util.h"
 #include "hostname-util.h"
index 5488999727e3297dee80e79c9d152141bacda8ad..c1af13d15be15460bfc4cad01bb148971f29280d 100644 (file)
@@ -38,6 +38,7 @@
 #include "log.h"
 #include "special.h"
 #include "util.h"
+#include "process-util.h"
 
 #define SERVER_FD_MAX 16
 #define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC))
index a8755751ee78392706eb1530aaf7482921442a1e..66d5369a54fd81e10b34ea7362124a2ce71034ff 100644 (file)
@@ -43,6 +43,7 @@
 #include "journald-native.h"
 #include "macro.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
 #include "stat-util.h"
index 7566543c1aacd979cf48e490cdde9ef10d55c120..0b74ca98a707e0958f9e10d69c4595080ebe8700 100644 (file)
@@ -37,6 +37,7 @@
 #include "log.h"
 #include "mkdir.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "sigbus.h"
 #include "signal-util.h"
 #include "string-util.h"
index 6d670e2f4fb3f20237aa08b02b90a031e337b0fe..2724a2df95ef621b2c2cd3f11d20dc893e875909 100644 (file)
@@ -28,6 +28,7 @@
 #include "journald-kmsg.h"
 #include "journald-server.h"
 #include "journald-syslog.h"
+#include "process-util.h"
 #include "sigbus.h"
 
 int main(int argc, char *argv[]) {
index 8a1b161d8f62ef858c33d48372a7aab712273792..6da7bf8e81a41068d339dd47985413337466d16a 100644 (file)
@@ -48,6 +48,7 @@
 #include "lookup3.h"
 #include "missing.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "replace-var.h"
 #include "stat-util.h"
 #include "stdio-util.h"
index 409a876054aa644b20d7763f3183c2ea2cc5121f..1f77197549b5f74900af14f166971340680e31ff 100644 (file)
@@ -23,6 +23,7 @@
 #include "env-util.h"
 #include "macro.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "random-util.h"
 #include "string-util.h"
 #include "util.h"
index c20e9fca35393960ceb24049548cf46f0e67d4cf..94386e4860961d1a735835bc0dfb6dc075782c42 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/if.h>
 #include <netinet/ether.h>
 
+#include "sd-id128.h"
 #include "sd-ndisc.h"
 
 #include "alloc-util.h"
index 63fb355e85a22ee31e9aeb708a2c54aff44d812c..907b72391b60d7d78b75b14f1f961be073d81ce2 100644 (file)
@@ -28,6 +28,7 @@
 #include "dhcp-server-internal.h"
 #include "fd-util.h"
 #include "in-addr-util.h"
+#include "sd-id128.h"
 #include "siphash24.h"
 #include "string-util.h"
 #include "unaligned.h"
index 23e2f5211dd2e3e5d5197ddb69817f95f10f7331..f3d09eb30abcaee42336af64622c16bd0f75cb92 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "sd-id128.h"
 #include "sd-ipv4acd.h"
 #include "sd-ipv4ll.h"
 
index c62689373f574e7b78f7214c904cf01db7e32e5f..b91797cb663dd356ba53bc4fd421a7740b2052c0 100644 (file)
@@ -20,6 +20,7 @@
 ***/
 
 #include <arpa/inet.h>
+#include <errno.h>
 #include <net/ethernet.h>
 #include <stdio.h>
 #include <string.h>
index c6e3bf99fb20bf7b8a9089bf7f3e74eda2ad546c..da4ed7b12753b8b4d5393f1dc76c08d494b73614 100644 (file)
@@ -33,6 +33,7 @@
 #include "bus-message.h"
 #include "bus-util.h"
 #include "capability-util.h"
+#include "process-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
 #include "strv.h"
index 6a990a02c0485595ccba2be4bd43653f4ae8f3c5..e6ab984d1f33ce9506097ed22f654b91d9bacf44 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <string.h>
+
+#include "sd-bus.h"
+
 #include "bus-gvariant.h"
 #include "bus-signature.h"
 #include "bus-type.h"
index d16461f4ae95a56171e8a373db3fdbe60a83ad54..f3cd9bd0fa2daf788aaecfae48a865efb38fdaae 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <util.h>
 
+#include "sd-bus.h"
+
 #include "bus-signature.h"
 #include "bus-type.h"
 
index 61539313bcec94f7b33c6fae9cb630160c1c7d1a..cc52bfdd07857a321d1b77329126d5a074b9b6fc 100644 (file)
@@ -38,6 +38,7 @@
 #include "macro.h"
 #include "missing.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "selinux-util.h"
 #include "signal-util.h"
 #include "stdio-util.h"
index fe486f441dbbd6ddbeaa62a734bd9564c3478025..980b35d8ea91cd9a851d0bc63d840e04c0437348 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+
+#include "sd-bus.h"
+
 #include "bus-type.h"
 
 bool bus_type_is_valid(char c) {
index ae272b1e6a33521b8bc3cfe49f5e5e939d0a1fb2..834f09777a5d05fc6ead547e4b3f5bf43feac51c 100644 (file)
@@ -22,8 +22,6 @@
 
 #include <stdbool.h>
 
-#include "sd-bus.h"
-
 #include "macro.h"
 
 bool bus_type_is_valid(char c) _const_;
index 8c8853c7eeb19115e9872078c60f55645f6b4a20..e723960e9f786f818b71e3c1aaa2bfabd5ca4ace 100644 (file)
@@ -50,6 +50,7 @@
 #include "macro.h"
 #include "missing.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
index 320e8347f4ac42fb366a86b3c55cc8533d0db5b1..94c9d09de3c08845ec604d201211063bdf46cb5c 100644 (file)
@@ -18,6 +18,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+#include <sys/socket.h>
+
 #include "sd-bus.h"
 
 #include "macro.h"
index ba383e0b3b04fbd78238b8ca2a0f8ba110173e8b..93721a5cf4fa8e07f1734931c66ddc895d871aa7 100644 (file)
@@ -39,6 +39,7 @@
 #include "fs-util.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "socket-util.h"
 #include "strv.h"
 #include "util.h"
index 87a0c8522d3ad75b53e30c16e95480149fed324b..9873ae4a588b57b63a3f557cd4cba9bd09d39043 100644 (file)
@@ -27,6 +27,7 @@
 #include "macro.h"
 #include "signal-util.h"
 #include "util.h"
+#include "process-util.h"
 
 static int prepare_handler(sd_event_source *s, void *userdata) {
         log_info("preparing %c", PTR_TO_INT(userdata));
index 5541e8d47e64707efd32bda46c4d69ba836a79d9..a6e38578b168443976c2c45eb71647ebced7eb40 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 
index d3c4e7130a11d99d2c09faec30bedce3a6def00e..116e287bb6655f487a80f4de5147317b2c513f49 100644 (file)
@@ -30,6 +30,7 @@
 #include "missing.h"
 #include "netlink-internal.h"
 #include "netlink-util.h"
+#include "process-util.h"
 #include "socket-util.h"
 #include "util.h"
 
index 6ed50b4e4a7df8f806efabf957dab305e77a95db..787642a7fb9c16aa421192071544eeedec85d7bc 100644 (file)
@@ -40,6 +40,7 @@
 #include "missing.h"
 #include "socket-util.h"
 #include "util.h"
+#include "process-util.h"
 
 #define WORKERS_MIN 1U
 #define WORKERS_MAX 16U
index adeba746f5b8ff9e95a8e42870b36c57bd19bceb..e338682f419cc3064788142655c2b30f365d82e8 100644 (file)
@@ -31,6 +31,7 @@
 #include "fd-util.h"
 #include "logind.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "udev-util.h"
index cbaaa48e5a5943dddc80284b03d2a667d93a94cb..d15d4cec5b0327774a52df1155b00d69c1c0a0db 100644 (file)
 #include "alloc-util.h"
 #include "bus-error.h"
 #include "bus-util.h"
+#include "cgroup-util.h"
 #include "conf-parser.h"
 #include "def.h"
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "format-util.h"
 #include "logind.h"
+#include "process-util.h"
 #include "selinux-util.h"
 #include "signal-util.h"
 #include "strv.h"
 #include "udev-util.h"
-#include "cgroup-util.h"
 
 static void manager_free(Manager *m);
 
index 4597a7feebf919a2778ae06c8a71780b4c440793..4fc9b610afc0d2390f46ab6597b5e6a5545bb3a2 100644 (file)
@@ -18,6 +18,7 @@
     along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <fcntl.h>
 #include <linux/if_tun.h>
 #include <net/if.h>
index 9220b3200fbc1b3ceacea047515298138f60f9dc..2a2f50e3459249943681461e59abe53fc0bc33c0 100644 (file)
@@ -18,8 +18,9 @@
     along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <net/if.h>
+#include <errno.h>
 #include <linux/veth.h>
+#include <net/if.h>
 
 #include "sd-netlink.h"
 
index 3a0100d7e626197e585c5ff4309a08aa3c229394..e7c0e7602a85eaa0dde4f12b5a271c79652d8768 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <linux/if_vlan.h>
 #include <net/if.h>
 
index c0c5a153b096e10468c143ffc1f6461a00ecd665..10b8a6305265d93b50d8657a9ab2033cfa914ddb 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <stdio.h>
 
+#include "sd-id128.h"
+
 #include "macro.h"
 #include "nspawn-expose-ports.h"
 #include "nspawn-mount.h"
index cb1be273f4e2a905dc7697b0d6cabb9b542ff4c6..b08bcd988a3ea2f14da697b58e747ef824411241 100644 (file)
@@ -23,6 +23,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "errno.h"
 #include "fd-util.h"
 #include "mkdir.h"
 #include "nspawn-setuid.h"
index 2ed31ac7abeb9e39c220a2a21f7392b6dd87d80b..a957967dfe244a985dafac9b2772a05b8277188a 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "alloc-util.h"
 #include "dissect-image.h"
+#include "process-util.h"
 #include "signal-util.h"
 #include "string-util.h"
 
index 347252a90f706fce3c7380a0b56016e097551e7e..0c366b5e8ef0d4058c2a388d85aac35a82605aab 100644 (file)
@@ -19,6 +19,7 @@
 ***/
 
 #include <sys/socket.h>
+#include <errno.h>
 
 #include "dns-type.h"
 #include "parse-util.h"
index 458c908fadced1ae578c9a96961e22d714c4cef5..c1f118fecc29747d4fb5075c4bf182822d59ae86 100644 (file)
@@ -21,6 +21,8 @@
 #include <net/if.h>
 #include <glob.h>
 
+#include "sd-id128.h"
+
 #include "alloc-util.h"
 #include "fileio.h"
 #include "glob-util.h"
index 4f255f620bada024ce28f8222a30460dd730d6c1..9c3bdd47de45b8013ce38eb6aebdf4adf2d6df64 100644 (file)
@@ -20,6 +20,8 @@
 #include <stdio.h>
 #include <linux/magic.h>
 
+#include "sd-id128.h"
+
 #include "alloc-util.h"
 #include "blkid-util.h"
 #include "bootspec.h"
index 35b2c56555b307d7b13794a92b1ba6939004b9e0..1f0579f548f847c9ac91e3af808cd46bc9c1e356 100644 (file)
@@ -22,6 +22,8 @@
 #include <sys/prctl.h>
 #include <sys/wait.h>
 
+#include "sd-id128.h"
+
 #include "architecture.h"
 #include "ask-password-api.h"
 #include "blkid-util.h"
index 53a1554a2879b1e35d5444eec221b9e6e9c6adb0..10e251ff095f064b912b6b885af47c0d0faa6cf3 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <stdbool.h>
 
+#include "sd-id128.h"
+
 #include "macro.h"
 
 typedef struct DissectedImage DissectedImage;
index 097de690e5ba9fad0db53fac3d869da93bd6b60a..37b8479f8811ba05c14d5398d87e92c7af7b6155 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <fcntl.h>
 #include <linux/loop.h>
 #include <sys/ioctl.h>
index 6b223b1ee56afd9205fd595df87934ecac13f74b..dd8bf0b58262f521259d04484388dcd024883ee1 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 typedef const char* (*lookup_t)(int);
 typedef int (*reverse_t)(const char*);
index 85512d00afd5c33a2b678c385e3d9cfe950c4ba9..c92ad0adc065920845942f5e194bffe5e107d748 100644 (file)
@@ -18,6 +18,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+
 #include "alloc-util.h"
 #include "macro.h"
 #include "parse-util.h"
index 2ae95db162e5a0caeae3510aac17e1944312c0b0..b2440fc3a95240141bd97930b53bd1915fe26019 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "cgroup-util.h"
 #include "path-util.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "util.h"
 
index 84ab083e8728e8ddb3957e56cb0f17661f3b7eca..3e7c197cfeda001275e938866a0b8a0032687730 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 
index f3b4258d6b5b4227831fcf4cbe427a131af83cf9..0366727476cf6ddc406da9fefecac8a7220dd32f 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdio.h>
 
 #include "alloc-util.h"
index 4f19cb406f918ecc9eb4ae96115f3ddd6e68b5bb..3e25a0bac8e38b286dc3d653f20a104fefa89dc7 100644 (file)
@@ -18,6 +18,8 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
+
 #include "alloc-util.h"
 #include "hexdecoct.h"
 #include "macro.h"
index 9468349cbaed9dab2223024a3caaccf500b9327e..fd19899480791c3ea5a1f8d10c7caf67bb854504 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "format-util.h"
 #include "log.h"
+#include "process-util.h"
 #include "util.h"
 
 assert_cc(LOG_REALM_REMOVE_LEVEL(LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_FTP | LOG_DEBUG))
index 76e2b38b177e75a0146a081eaaa409feba02df61..87b4facb8572e4e99d60db7aadfba1b72abf3670 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
 
index 8259e133c3320392692c04e2d7337f1e0974c5c8..937500213360d7419cce638da5ff00f21fcb35f9 100644 (file)
@@ -19,6 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <locale.h>
 #include <math.h>
 
index 13a1d2ba1fdb8a9f6bc0419e1a36aba3d7aec70e..f4b19ed69d312a867c569c3a02b09e084dea5db9 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "macro.h"
 #include "signal-util.h"
+#include "process-util.h"
 
 static void test_block_signals(void) {
         sigset_t ss;
index cc07dc3634ee9e238c2583f0ab5e6e87d0f9c8eb..aed6db8423da0e1bbf0ad5f075b65ba361a3600c 100644 (file)
@@ -19,6 +19,7 @@
 ***/
 
 #include <stdio.h>
+#include <string.h>
 
 #include "time-util.h"
 
index 5b1574e8ea2008c525a013954f1a9ab7dfd03894..d1ab7486ed92f4d220cef85bdfd548cb59dfc853 100644 (file)
@@ -28,6 +28,7 @@
 #include "in-addr-util.h"
 #include "log.h"
 #include "macro.h"
+#include "process-util.h"
 #include "socket-util.h"
 #include "string-util.h"
 #include "util.h"
index c479eccb8bfef5c81babef1135251e3f3311c675..8e57fe046179eb056e370b09e683107b9c39b91e 100644 (file)
@@ -29,6 +29,7 @@
 #include "format-util.h"
 #include "fs-util.h"
 #include "log.h"
+#include "process-util.h"
 #include "string-util.h"
 #include "util.h"
 
index 2124511bf02a051b7b984546c6c8ba4488fc22e0..21d90f0888ee6206e0b79bfaa0d34b6ab7fcaeed 100644 (file)
@@ -28,6 +28,7 @@
 #include "fileio.h"
 #include "fs-util.h"
 #include "parse-util.h"
+#include "process-util.h"
 #include "raw-clone.h"
 #include "rm-rf.h"
 #include "string-util.h"
index e068d1ddd4caf228ee9233c8fd02e63a71c541f9..ffcf408f57d41e4b51192117d562bd273448a047 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <string.h>
 #include <unistd.h>
 
 #include "env-util.h"
index d80d61583dd7fa4684eb0a35890c4a1f67552714..9546a6ebaf1984ef57bbc663c6b67a97f07fba8f 100644 (file)
@@ -21,6 +21,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "process-util.h"
 #include "time-util.h"
 #include "udev-util.h"
 #include "udev.h"
index c29c6f0bb3f085b524ceccdd2c4c5badbe6ae17f..24bee41243f11330dd4463377a40106a3ba80ac6 100644 (file)
@@ -18,6 +18,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <sys/stat.h>
index d3066ca429daf94248780820ba2caa0612bf8466..3b4e72bf9ec555dffbf485e0d31076db151cd60f 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include <errno.h>
 #include <stdio.h>
 #include <sys/stat.h>
 
+#include "alloc-util.h"
 #include "crypt-util.h"
-#include "log.h"
 #include "hexdecoct.h"
+#include "log.h"
 #include "string-util.h"
-#include "alloc-util.h"
 
 static char *arg_root_hash = NULL;
 static char *arg_data_what = NULL;