diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-10-19 16:01:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-10-20 10:34:33 +0200 |
commit | bd1ae178336a3d9143feea35bb4885c923581e1d (patch) | |
tree | ace0e0a86173f28b68adb4359a1f11a44097ddce /src | |
parent | executor: return instead of assert on invalid command line arguments (diff) | |
download | systemd-bd1ae178336a3d9143feea35bb4885c923581e1d.tar.xz systemd-bd1ae178336a3d9143feea35bb4885c923581e1d.zip |
io-util: split out "struct iovec" related calls into their own .c/.h files
This is preparation for #28891, which adds a bunch more helpers around
"struct iovec", at which point this really deserves its own .c/.h file.
The idea is that we sooner or later can consider "struct iovec" as an
entirely generic mechanism to reference some binary blob, and is the
go-to type for this purpose whenever we need one.
Diffstat (limited to 'src')
55 files changed, 143 insertions, 113 deletions
diff --git a/src/basic/audit-util.c b/src/basic/audit-util.c index 92479affa3..bf96e080d2 100644 --- a/src/basic/audit-util.c +++ b/src/basic/audit-util.c @@ -10,7 +10,7 @@ #include "audit-util.h" #include "fd-util.h" #include "fileio.h" -#include "io-util.h" +#include "iovec-util.h" #include "macro.h" #include "parse-util.h" #include "process-util.h" diff --git a/src/basic/io-util.c b/src/basic/io-util.c index 25831e47dc..eda4f1fac3 100644 --- a/src/basic/io-util.c +++ b/src/basic/io-util.c @@ -7,6 +7,7 @@ #include "errno-util.h" #include "io-util.h" +#include "iovec-util.h" #include "string-util.h" #include "time-util.h" @@ -305,23 +306,6 @@ ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length) { return q - (const uint8_t*) p; } -char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) { - char *x; - - x = strjoin(field, value); - if (x) - iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x); - return x; -} - -char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value) { - char *x; - - x = set_iovec_string_field(iovec, n_iovec, field, value); - free(value); - return x; -} - struct iovec_wrapper *iovw_new(void) { return malloc0(sizeof(struct iovec_wrapper)); } @@ -429,13 +413,3 @@ rollback: target->count = original_count; return r; } - -void iovec_array_free(struct iovec *iov, size_t n) { - if (!iov) - return; - - for (size_t i = 0; i < n; i++) - free(iov[i].iov_base); - - free(iov); -} diff --git a/src/basic/io-util.h b/src/basic/io-util.h index 2a1b2fe5da..45278fbde9 100644 --- a/src/basic/io-util.h +++ b/src/basic/io-util.h @@ -28,38 +28,6 @@ int fd_wait_for_event(int fd, int event, usec_t timeout); ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length); -static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) { - size_t r = 0; - - for (size_t j = 0; j < n; j++) - r += i[j].iov_len; - - return r; -} - -static inline bool IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) { - /* Returns true if there is nothing else to send (bytes written cover all of the iovec), - * false if there's still work to do. */ - - for (size_t j = 0; j < n; j++) { - size_t sub; - - if (i[j].iov_len == 0) - continue; - if (k == 0) - return false; - - sub = MIN(i[j].iov_len, k); - i[j].iov_len -= sub; - i[j].iov_base = (uint8_t*) i[j].iov_base + sub; - k -= sub; - } - - assert(k == 0); /* Anything else would mean that we wrote more bytes than available, - * or the kernel reported writing more bytes than sent. */ - return true; -} - static inline bool FILE_SIZE_VALID(uint64_t l) { /* ftruncate() and friends take an unsigned file size, but actually cannot deal with file sizes larger than * 2^63 since the kernel internally handles it as signed value. This call allows checking for this early. */ @@ -78,17 +46,6 @@ static inline bool FILE_SIZE_VALID_OR_INFINITY(uint64_t l) { } -#define IOVEC_NULL (struct iovec) {} -#define IOVEC_MAKE(base, len) (struct iovec) { .iov_base = (base), .iov_len = (len) } -#define IOVEC_MAKE_STRING(string) \ - ({ \ - char *_s = (char*) (string); \ - IOVEC_MAKE(_s, strlen(_s)); \ - }) - -char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value); -char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value); - struct iovec_wrapper { struct iovec *iovec; size_t count; @@ -123,5 +80,3 @@ int iovw_put_string_field_free(struct iovec_wrapper *iovw, const char *field, ch void iovw_rebase(struct iovec_wrapper *iovw, char *old, char *new); size_t iovw_size(struct iovec_wrapper *iovw); int iovw_append(struct iovec_wrapper *target, const struct iovec_wrapper *source); - -void iovec_array_free(struct iovec *iov, size_t n); diff --git a/src/basic/iovec-util.c b/src/basic/iovec-util.c new file mode 100644 index 0000000000..89c1af34f1 --- /dev/null +++ b/src/basic/iovec-util.c @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + +#include "iovec-util.h" +#include "string-util.h" + + +char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) { + char *x; + + assert(iovec); + assert(n_iovec); + + x = strjoin(field, value); + if (x) + iovec[(*n_iovec)++] = IOVEC_MAKE_STRING(x); + return x; +} + +char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value) { + char *x; + + assert(iovec); + assert(n_iovec); + + x = set_iovec_string_field(iovec, n_iovec, field, value); + free(value); + return x; +} + +void iovec_array_free(struct iovec *iov, size_t n) { + if (!iov) + return; + + for (size_t i = 0; i < n; i++) + free(iov[i].iov_base); + + free(iov); +} diff --git a/src/basic/iovec-util.h b/src/basic/iovec-util.h new file mode 100644 index 0000000000..7ee72671c4 --- /dev/null +++ b/src/basic/iovec-util.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +#pragma once + +#include <stdbool.h> +#include <sys/types.h> +#include <sys/uio.h> + +#include "macro.h" + +static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) { + size_t r = 0; + + for (size_t j = 0; j < n; j++) + r += i[j].iov_len; + + return r; +} + +static inline bool IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) { + /* Returns true if there is nothing else to send (bytes written cover all of the iovec), + * false if there's still work to do. */ + + for (size_t j = 0; j < n; j++) { + size_t sub; + + if (i[j].iov_len == 0) + continue; + if (k == 0) + return false; + + sub = MIN(i[j].iov_len, k); + i[j].iov_len -= sub; + i[j].iov_base = (uint8_t*) i[j].iov_base + sub; + k -= sub; + } + + assert(k == 0); /* Anything else would mean that we wrote more bytes than available, + * or the kernel reported writing more bytes than sent. */ + return true; +} + +#define IOVEC_NULL (struct iovec) {} +#define IOVEC_MAKE(base, len) (struct iovec) { .iov_base = (base), .iov_len = (len) } +#define IOVEC_MAKE_STRING(string) \ + ({ \ + char *_s = (char*) (string); \ + IOVEC_MAKE(_s, strlen(_s)); \ + }) + +char* set_iovec_string_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value); +char* set_iovec_string_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value); + +void iovec_array_free(struct iovec *iov, size_t n); diff --git a/src/basic/log.c b/src/basic/log.c index 17b9b2afe0..b05620907b 100644 --- a/src/basic/log.c +++ b/src/basic/log.c @@ -21,7 +21,7 @@ #include "errno-util.h" #include "fd-util.h" #include "format-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "log.h" #include "macro.h" #include "missing_syscall.h" diff --git a/src/basic/meson.build b/src/basic/meson.build index 0e4c5584da..a06931c863 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -44,6 +44,7 @@ basic_sources = files( 'initrd-util.c', 'inotify-util.c', 'io-util.c', + 'iovec-util.c', 'ioprio-util.c', 'label.c', 'limits-util.c', diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 74322645de..ed9f01dd9e 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -20,7 +20,7 @@ #include "fd-util.h" #include "fileio.h" #include "hexdecoct.h" -#include "io-util.h" +#include "iovec-util.h" #include "ioprio-util.h" #include "journal-file.h" #include "load-fragment.h" diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index a70f64f7ff..9e465791b3 100644 --- a/src/core/dynamic-user.c +++ b/src/core/dynamic-user.c @@ -10,7 +10,7 @@ #include "fileio.h" #include "format-util.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "lock-util.h" #include "nscd-flush.h" #include "parse-util.h" diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index 02d6af29f8..3b8cec8258 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -40,6 +40,7 @@ #include "fd-util.h" #include "hexdecoct.h" #include "io-util.h" +#include "iovec-util.h" #include "missing_ioprio.h" #include "missing_prctl.h" #include "missing_securebits.h" diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index ece2ec840f..6e3a22bc16 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -39,7 +39,7 @@ #include "firewall-util.h" #include "fs-util.h" #include "hexdecoct.h" -#include "io-util.h" +#include "iovec-util.h" #include "ioprio-util.h" #include "ip-protocol-list.h" #include "journal-file.h" diff --git a/src/core/show-status.c b/src/core/show-status.c index c6b106fc9c..d5eb724159 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -6,7 +6,7 @@ #include "alloc-util.h" #include "fd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "parse-util.h" #include "show-status.h" #include "string-table.h" diff --git a/src/core/unit.c b/src/core/unit.c index a60656709a..179059b94f 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -33,7 +33,7 @@ #include "format-util.h" #include "id128-util.h" #include "install.h" -#include "io-util.h" +#include "iovec-util.h" #include "label-util.h" #include "load-dropin.h" #include "load-fragment.h" diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 1962512c67..1a49c8d777 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -29,7 +29,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-importer.h" #include "journal-send.h" #include "log.h" diff --git a/src/fuzz/fuzz-varlink.c b/src/fuzz/fuzz-varlink.c index 3407760fbf..e98929d1c6 100644 --- a/src/fuzz/fuzz-varlink.c +++ b/src/fuzz/fuzz-varlink.c @@ -6,7 +6,7 @@ #include "fd-util.h" #include "fuzz.h" #include "hexdecoct.h" -#include "io-util.h" +#include "iovec-util.h" #include "varlink.h" #include "log.h" diff --git a/src/journal/journald-audit.c b/src/journal/journald-audit.c index a2ebf97c9c..bddfe76c1a 100644 --- a/src/journal/journald-audit.c +++ b/src/journal/journald-audit.c @@ -7,7 +7,7 @@ #include "errno-util.h" #include "fd-util.h" #include "hexdecoct.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-internal.h" #include "journald-audit.h" #include "missing_audit.h" diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c index d914f92999..dfa4096a91 100644 --- a/src/journal/journald-console.c +++ b/src/journal/journald-console.c @@ -8,7 +8,7 @@ #include "fd-util.h" #include "fileio.h" #include "format-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journald-console.h" #include "journald-server.h" #include "parse-util.h" diff --git a/src/journal/journald-context.c b/src/journal/journald-context.c index cc5b4bc6ad..f5f6ec590f 100644 --- a/src/journal/journald-context.c +++ b/src/journal/journald-context.c @@ -11,7 +11,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-internal.h" #include "journal-util.h" #include "journald-client.h" diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index 5ee4c7e057..28d48808d0 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -15,7 +15,7 @@ #include "fd-util.h" #include "format-util.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-internal.h" #include "journald-kmsg.h" #include "journald-server.h" diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c index 4888c38fdb..06073ac0a5 100644 --- a/src/journal/journald-native.c +++ b/src/journal/journald-native.c @@ -9,7 +9,7 @@ #include "alloc-util.h" #include "fd-util.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-importer.h" #include "journal-internal.h" #include "journal-util.h" diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 371338211a..8712d72acf 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -28,7 +28,7 @@ #include "hostname-util.h" #include "id128-util.h" #include "initrd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-authenticate.h" #include "journal-file-util.h" #include "journal-internal.h" diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c index 222b036698..05a715e46b 100644 --- a/src/journal/journald-stream.c +++ b/src/journal/journald-stream.c @@ -18,7 +18,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-internal.h" #include "journald-client.h" #include "journald-console.h" diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c index c1c0a913eb..f6accb5b44 100644 --- a/src/journal/journald-syslog.c +++ b/src/journal/journald-syslog.c @@ -9,7 +9,7 @@ #include "alloc-util.h" #include "fd-util.h" #include "format-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-internal.h" #include "journald-client.h" #include "journald-console.h" diff --git a/src/libsystemd-network/icmp6-util.c b/src/libsystemd-network/icmp6-util.c index ecd0dd0f31..a0521f0562 100644 --- a/src/libsystemd-network/icmp6-util.c +++ b/src/libsystemd-network/icmp6-util.c @@ -17,7 +17,7 @@ #include "fd-util.h" #include "icmp6-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "socket-util.h" #define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \ diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 7ecd207993..a74a239e12 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -24,7 +24,7 @@ #include "event-util.h" #include "fd-util.h" #include "hostname-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "memory-util.h" #include "network-common.h" #include "random-util.h" diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index a2385ccb89..22a03203a8 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -15,7 +15,7 @@ #include "dns-domain.h" #include "fd-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "memory-util.h" #include "network-common.h" #include "ordered-set.h" diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index d2402e676a..08b8676850 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -21,7 +21,7 @@ #include "hexdecoct.h" #include "hostname-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "random-util.h" #include "socket-util.h" #include "sort-util.h" diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c index 7da22c90c2..511d06d805 100644 --- a/src/libsystemd-network/sd-radv.c +++ b/src/libsystemd-network/sd-radv.c @@ -16,7 +16,7 @@ #include "fd-util.h" #include "icmp6-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "macro.h" #include "memory-util.h" #include "network-common.h" diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index f1cf6a8cc4..150e7c9b9e 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -12,7 +12,7 @@ #include "bus-signature.h" #include "bus-type.h" #include "fd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "memfd-util.h" #include "memory-util.h" #include "string-util.h" diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 5079d68550..3c59d0d615 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -18,6 +18,7 @@ #include "fs-util.h" #include "hexdecoct.h" #include "io-util.h" +#include "iovec-util.h" #include "macro.h" #include "memory-util.h" #include "path-util.h" diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c index 5711e5e18a..5fccf0d760 100644 --- a/src/libsystemd/sd-daemon/sd-daemon.c +++ b/src/libsystemd/sd-daemon/sd-daemon.c @@ -19,6 +19,7 @@ #include "fd-util.h" #include "fs-util.h" #include "io-util.h" +#include "iovec-util.h" #include "parse-util.h" #include "path-util.h" #include "process-util.h" diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c index 10d455888f..15cb8d0774 100644 --- a/src/libsystemd/sd-device/device-monitor.c +++ b/src/libsystemd/sd-device/device-monitor.c @@ -20,7 +20,7 @@ #include "fd-util.h" #include "format-util.h" #include "hashmap.h" -#include "io-util.h" +#include "iovec-util.h" #include "missing_socket.h" #include "mountpoint-util.h" #include "set.h" diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c index 784c7e5fb1..1ca721e6c9 100644 --- a/src/libsystemd/sd-journal/journal-send.c +++ b/src/libsystemd/sd-journal/journal-send.c @@ -19,6 +19,7 @@ #include "fd-util.h" #include "fileio.h" #include "io-util.h" +#include "iovec-util.h" #include "journal-send.h" #include "memfd-util.h" #include "missing_syscall.h" diff --git a/src/libsystemd/sd-journal/test-journal-append.c b/src/libsystemd/sd-journal/test-journal-append.c index fbbf44add4..90a7ccb00f 100644 --- a/src/libsystemd/sd-journal/test-journal-append.c +++ b/src/libsystemd/sd-journal/test-journal-append.c @@ -8,7 +8,7 @@ #include "chattr-util.h" #include "fd-util.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-file-util.h" #include "log.h" #include "mmap-cache.h" diff --git a/src/libsystemd/sd-journal/test-journal-interleaving.c b/src/libsystemd/sd-journal/test-journal-interleaving.c index d8588759d1..fe97a9e4a6 100644 --- a/src/libsystemd/sd-journal/test-journal-interleaving.c +++ b/src/libsystemd/sd-journal/test-journal-interleaving.c @@ -8,7 +8,7 @@ #include "alloc-util.h" #include "chattr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-file-util.h" #include "journal-vacuum.h" #include "log.h" diff --git a/src/libsystemd/sd-journal/test-journal-stream.c b/src/libsystemd/sd-journal/test-journal-stream.c index 2897de4905..1dbfdcd607 100644 --- a/src/libsystemd/sd-journal/test-journal-stream.c +++ b/src/libsystemd/sd-journal/test-journal-stream.c @@ -7,7 +7,7 @@ #include "alloc-util.h" #include "chattr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-file-util.h" #include "journal-internal.h" #include "log.h" diff --git a/src/libsystemd/sd-journal/test-journal-verify.c b/src/libsystemd/sd-journal/test-journal-verify.c index 7853b36495..d05312c88f 100644 --- a/src/libsystemd/sd-journal/test-journal-verify.c +++ b/src/libsystemd/sd-journal/test-journal-verify.c @@ -6,7 +6,7 @@ #include "chattr-util.h" #include "fd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-file-util.h" #include "journal-verify.h" #include "log.h" diff --git a/src/libsystemd/sd-journal/test-journal.c b/src/libsystemd/sd-journal/test-journal.c index a0916a0a24..badf6cdb45 100644 --- a/src/libsystemd/sd-journal/test-journal.c +++ b/src/libsystemd/sd-journal/test-journal.c @@ -4,7 +4,7 @@ #include <unistd.h> #include "chattr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-authenticate.h" #include "journal-file-util.h" #include "journal-vacuum.h" diff --git a/src/libsystemd/sd-netlink/netlink-message-nfnl.c b/src/libsystemd/sd-netlink/netlink-message-nfnl.c index edde5d2a88..ff7f7c3480 100644 --- a/src/libsystemd/sd-netlink/netlink-message-nfnl.c +++ b/src/libsystemd/sd-netlink/netlink-message-nfnl.c @@ -7,7 +7,7 @@ #include "sd-netlink.h" -#include "io-util.h" +#include "iovec-util.h" #include "netlink-internal.h" #include "netlink-types.h" #include "netlink-util.h" diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/sd-netlink/netlink-socket.c index 635867bb58..64cde89ecf 100644 --- a/src/libsystemd/sd-netlink/netlink-socket.c +++ b/src/libsystemd/sd-netlink/netlink-socket.c @@ -10,7 +10,7 @@ #include "alloc-util.h" #include "fd-util.h" #include "format-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "netlink-internal.h" #include "netlink-types.h" #include "socket-util.h" diff --git a/src/libsystemd/sd-netlink/netlink-util.c b/src/libsystemd/sd-netlink/netlink-util.c index 6ded66b935..636af1a2d5 100644 --- a/src/libsystemd/sd-netlink/netlink-util.c +++ b/src/libsystemd/sd-netlink/netlink-util.c @@ -3,7 +3,7 @@ #include "sd-netlink.h" #include "fd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "memory-util.h" #include "netlink-internal.h" #include "netlink-util.h" diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index dcd3547f8b..2000f86e69 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -19,6 +19,7 @@ #include "errno-util.h" #include "fd-util.h" #include "io-util.h" +#include "iovec-util.h" #include "list.h" #include "memory-util.h" #include "missing_syscall.h" diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 347cc9b0c0..09302c0dee 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -19,7 +19,7 @@ #include "format-util.h" #include "fs-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "local-addresses.h" #include "machine-dbus.h" #include "machine.h" diff --git a/src/portable/portable.c b/src/portable/portable.c index a672bff3c5..89d9200770 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -22,7 +22,7 @@ #include "fileio.h" #include "fs-util.h" #include "install.h" -#include "io-util.h" +#include "iovec-util.h" #include "locale-util.h" #include "loop-util.h" #include "mkdir.h" diff --git a/src/pstore/pstore.c b/src/pstore/pstore.c index 4501b38cff..3c1d9bd74b 100644 --- a/src/pstore/pstore.c +++ b/src/pstore/pstore.c @@ -28,7 +28,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "journal-importer.h" #include "log.h" #include "macro.h" diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c index 85e4762ba2..bc01613b51 100644 --- a/src/resolve/resolved-dns-stream.c +++ b/src/resolve/resolved-dns-stream.c @@ -5,7 +5,7 @@ #include "alloc-util.h" #include "fd-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "macro.h" #include "missing_network.h" #include "resolved-dns-stream.h" diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index ed3800ed8a..fd800cedfe 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -19,6 +19,7 @@ #include "hostname-util.h" #include "idn-util.h" #include "io-util.h" +#include "iovec-util.h" #include "memstream-util.h" #include "missing_network.h" #include "missing_socket.h" diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 416130b9cc..a5cf8974db 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -28,6 +28,7 @@ #include "fs-util.h" #include "glyph-util.h" #include "io-util.h" +#include "iovec-util.h" #include "keyring-util.h" #include "log.h" #include "macro.h" diff --git a/src/shared/openssl-util.h b/src/shared/openssl-util.h index 3f2971375a..e3f34a8576 100644 --- a/src/shared/openssl-util.h +++ b/src/shared/openssl-util.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "io-util.h" +#include "iovec-util.h" #include "macro.h" #include "sha256.h" diff --git a/src/shared/varlink.c b/src/shared/varlink.c index 683ceb314a..3ecc7502f3 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -11,6 +11,7 @@ #include "glyph-util.h" #include "hashmap.h" #include "io-util.h" +#include "iovec-util.h" #include "list.h" #include "path-util.h" #include "process-util.h" diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index 721cdbd5fd..fd197ca622 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -13,7 +13,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "memfd-util.h" #include "parse-util.h" #include "path-util.h" diff --git a/src/test/test-log.c b/src/test/test-log.c index e337a3c7df..28acb3fb8a 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -5,6 +5,7 @@ #include "format-util.h" #include "io-util.h" +#include "iovec-util.h" #include "log.h" #include "process-util.h" #include "string-util.h" diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index 2c5d31e5f8..3372805aa1 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -14,7 +14,7 @@ #include "fd-util.h" #include "fs-util.h" #include "in-addr-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "log.h" #include "macro.h" #include "path-util.h" diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index 7d9a8c018f..24ba8231f5 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -14,7 +14,7 @@ #include "errno-util.h" #include "fd-util.h" #include "format-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "socket-util.h" #include "strxcpyx.h" #include "udev-ctrl.h" diff --git a/src/udev/udev-manager.c b/src/udev/udev-manager.c index 88a4c608e4..dab36c9057 100644 --- a/src/udev/udev-manager.c +++ b/src/udev/udev-manager.c @@ -14,7 +14,7 @@ #include "fs-util.h" #include "hashmap.h" #include "inotify-util.h" -#include "io-util.h" +#include "iovec-util.h" #include "limits-util.h" #include "list.h" #include "mkdir.h" |