diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-01-11 00:39:12 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-01-11 14:44:31 +0100 |
commit | dccca82b1a28c861a466a0905faee19ee009429a (patch) | |
tree | e6933b1f4ba8b9cd2c076c98c55e08f5ac72a1db /src/veritysetup | |
parent | 1a86b085138234c9166614adc5ad399a19dae84b (diff) | |
download | systemd-dccca82b1a28c861a466a0905faee19ee009429a.tar.gz |
log: minimize includes in log.h
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)
Diffstat (limited to 'src/veritysetup')
-rw-r--r-- | src/veritysetup/veritysetup-generator.c | 1 | ||||
-rw-r--r-- | src/veritysetup/veritysetup.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/veritysetup/veritysetup-generator.c b/src/veritysetup/veritysetup-generator.c index c29c6f0bb3..24bee41243 100644 --- a/src/veritysetup/veritysetup-generator.c +++ b/src/veritysetup/veritysetup-generator.c @@ -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> diff --git a/src/veritysetup/veritysetup.c b/src/veritysetup/veritysetup.c index d3066ca429..3b4e72bf9e 100644 --- a/src/veritysetup/veritysetup.c +++ b/src/veritysetup/veritysetup.c @@ -18,14 +18,15 @@ 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; |