]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: split out sorting related calls to new sort-util.[ch] 11986/head
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Mar 2019 11:14:47 +0000 (12:14 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Mar 2019 11:16:43 +0000 (12:16 +0100)
39 files changed:
src/analyze/analyze.c
src/basic/conf-files.c
src/basic/meson.build
src/basic/sort-util.c [new file with mode: 0644]
src/basic/sort-util.h [new file with mode: 0644]
src/basic/strbuf.c
src/basic/strv.c
src/basic/util.c
src/basic/util.h
src/busctl/busctl.c
src/cgtop/cgtop.c
src/core/job.c
src/core/namespace.c
src/journal/catalog.c
src/journal/journal-file.c
src/journal/journal-vacuum.c
src/libsystemd-network/sd-lldp.c
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-device/device-enumerator.c
src/libsystemd/sd-hwdb/hwdb-util.c
src/libsystemd/sd-netlink/local-addresses.c
src/machine/machinectl.c
src/mount/mount-tool.c
src/network/networkctl.c
src/nspawn/nspawn-mount.c
src/portable/portable.c
src/resolve/resolved-dns-dnssec.c
src/resolve/resolved-dns-trust-anchor.c
src/resolve/resolved-mdns.c
src/shared/bootspec.c
src/shared/bus-unit-util.c
src/shared/calendarspec.c
src/shared/cgroup-show.c
src/shared/efivars.c
src/shared/format-table.c
src/shared/uid-range.c
src/systemctl/systemctl.c
src/test/test-prioq.c
src/tmpfiles/tmpfiles.c

index 77adbed83d936be4199b2284c527ed9b5e894722..f838daada8b5f522308af54b7e2e6eceec66145c 100644 (file)
 #if HAVE_SECCOMP
 #  include "seccomp-util.h"
 #endif
+#include "sort-util.h"
 #include "special.h"
 #include "strv.h"
 #include "strxcpyx.h"
-#include "time-util.h"
 #include "terminal-util.h"
+#include "time-util.h"
 #include "unit-name.h"
 #include "util.h"
 #include "verbs.h"
index b70c6e50a8c76494a61c96c02aafc67fc1e61576..d010fbb2668f3de82c1019b6614e13d034c45d4c 100644 (file)
 #include "missing.h"
 #include "path-util.h"
 #include "set.h"
+#include "sort-util.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
-#include "util.h"
 
 static int files_add(
                 Hashmap *h,
index 3d382b394065f552fa90a25cd259107f58a48e91..30466ce9464cd1a9f32ba781891c33ae57ca93f7 100644 (file)
@@ -174,6 +174,8 @@ basic_sources = files('''
         socket-label.c
         socket-util.c
         socket-util.h
+        sort-util.c
+        sort-util.h
         sparse-endian.h
         special.h
         stat-util.c
diff --git a/src/basic/sort-util.c b/src/basic/sort-util.c
new file mode 100644 (file)
index 0000000..5cf0d1d
--- /dev/null
@@ -0,0 +1,27 @@
+#include "sort-util.h"
+#include "alloc-util.h"
+
+/* hey glibc, APIs with callbacks without a user pointer are so useless */
+void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+                 __compar_d_fn_t compar, void *arg) {
+        size_t l, u, idx;
+        const void *p;
+        int comparison;
+
+        assert(!size_multiply_overflow(nmemb, size));
+
+        l = 0;
+        u = nmemb;
+        while (l < u) {
+                idx = (l + u) / 2;
+                p = (const uint8_t*) base + idx * size;
+                comparison = compar(key, p, arg);
+                if (comparison < 0)
+                        u = idx;
+                else if (comparison > 0)
+                        l = idx + 1;
+                else
+                        return (void *)p;
+        }
+        return NULL;
+}
diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h
new file mode 100644 (file)
index 0000000..e029f86
--- /dev/null
@@ -0,0 +1,70 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <stdlib.h>
+
+#include "macro.h"
+
+void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
+                 __compar_d_fn_t compar, void *arg);
+
+#define typesafe_bsearch_r(k, b, n, func, userdata)                     \
+        ({                                                              \
+                const typeof(b[0]) *_k = k;                             \
+                int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \
+                xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \
+        })
+
+/**
+ * Normal bsearch requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+static inline void* bsearch_safe(const void *key, const void *base,
+                                 size_t nmemb, size_t size, __compar_fn_t compar) {
+        if (nmemb <= 0)
+                return NULL;
+
+        assert(base);
+        return bsearch(key, base, nmemb, size, compar);
+}
+
+#define typesafe_bsearch(k, b, n, func)                                 \
+        ({                                                              \
+                const typeof(b[0]) *_k = k;                             \
+                int (*_func_)(const typeof(b[0])*, const typeof(b[0])*) = func; \
+                bsearch_safe((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_fn_t) _func_); \
+        })
+
+/**
+ * Normal qsort requires base to be nonnull. Here were require
+ * that only if nmemb > 0.
+ */
+static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn_t compar) {
+        if (nmemb <= 1)
+                return;
+
+        assert(base);
+        qsort(base, nmemb, size, compar);
+}
+
+/* A wrapper around the above, but that adds typesafety: the element size is automatically derived from the type and so
+ * is the prototype for the comparison function */
+#define typesafe_qsort(p, n, func)                                      \
+        ({                                                              \
+                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
+                qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
+        })
+
+static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
+        if (nmemb <= 1)
+                return;
+
+        assert(base);
+        qsort_r(base, nmemb, size, compar, userdata);
+}
+
+#define typesafe_qsort_r(p, n, func, userdata)                          \
+        ({                                                              \
+                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
+                qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
+        })
index 81f4f21ade34562c173f6b5fc1fe948b6aea6856..769b22aba0ca5280095e293afb7c116e00e67d16 100644 (file)
@@ -5,8 +5,8 @@
 #include <string.h>
 
 #include "alloc-util.h"
+#include "sort-util.h"
 #include "strbuf.h"
-#include "util.h"
 
 /*
  * Strbuf stores given strings in a single continuous allocated memory
index 3a62f25ded57fb6cb02c1db45cb1232d8ea36cff..3700ce5b30b524145a8c0de9aee48f689a9b1f65 100644 (file)
@@ -11,9 +11,9 @@
 #include "escape.h"
 #include "extract-word.h"
 #include "fileio.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "strv.h"
-#include "util.h"
 
 char *strv_find(char **l, const char *name) {
         char **i;
index fd0277b5dfe4567f5c101ba1f587374db80863aa..ce3e321925d4b1fd2a0f34e1a5951395d1d57634 100644 (file)
@@ -126,31 +126,6 @@ void in_initrd_force(bool value) {
         saved_in_initrd = value;
 }
 
-/* hey glibc, APIs with callbacks without a user pointer are so useless */
-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
-                 __compar_d_fn_t compar, void *arg) {
-        size_t l, u, idx;
-        const void *p;
-        int comparison;
-
-        assert(!size_multiply_overflow(nmemb, size));
-
-        l = 0;
-        u = nmemb;
-        while (l < u) {
-                idx = (l + u) / 2;
-                p = (const uint8_t*) base + idx * size;
-                comparison = compar(key, p, arg);
-                if (comparison < 0)
-                        u = idx;
-                else if (comparison > 0)
-                        l = idx + 1;
-                else
-                        return (void *)p;
-        }
-        return NULL;
-}
-
 int on_ac_power(void) {
         bool found_offline = false, found_online = false;
         _cleanup_closedir_ DIR *d = NULL;
index 3c2958674956a11bba3fd915c877e6125639efd3..02fc31e69e380bea2eb5028add1485a7e697a6f8 100644 (file)
@@ -63,70 +63,6 @@ int prot_from_flags(int flags) _const_;
 bool in_initrd(void);
 void in_initrd_force(bool value);
 
-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size,
-                 __compar_d_fn_t compar, void *arg);
-
-#define typesafe_bsearch_r(k, b, n, func, userdata)                     \
-        ({                                                              \
-                const typeof(b[0]) *_k = k;                             \
-                int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \
-                xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \
-        })
-
-/**
- * Normal bsearch requires base to be nonnull. Here were require
- * that only if nmemb > 0.
- */
-static inline void* bsearch_safe(const void *key, const void *base,
-                                 size_t nmemb, size_t size, __compar_fn_t compar) {
-        if (nmemb <= 0)
-                return NULL;
-
-        assert(base);
-        return bsearch(key, base, nmemb, size, compar);
-}
-
-#define typesafe_bsearch(k, b, n, func)                                 \
-        ({                                                              \
-                const typeof(b[0]) *_k = k;                             \
-                int (*_func_)(const typeof(b[0])*, const typeof(b[0])*) = func; \
-                bsearch_safe((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_fn_t) _func_); \
-        })
-
-/**
- * Normal qsort requires base to be nonnull. Here were require
- * that only if nmemb > 0.
- */
-static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn_t compar) {
-        if (nmemb <= 1)
-                return;
-
-        assert(base);
-        qsort(base, nmemb, size, compar);
-}
-
-/* A wrapper around the above, but that adds typesafety: the element size is automatically derived from the type and so
- * is the prototype for the comparison function */
-#define typesafe_qsort(p, n, func)                                      \
-        ({                                                              \
-                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \
-                qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \
-        })
-
-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) {
-        if (nmemb <= 1)
-                return;
-
-        assert(base);
-        qsort_r(base, nmemb, size, compar, userdata);
-}
-
-#define typesafe_qsort_r(p, n, func, userdata)                          \
-        ({                                                              \
-                int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \
-                qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \
-        })
-
 int on_ac_power(void);
 
 static inline void _reset_errno_(int *saved_errno) {
index a61fd2e7066dc54155560c93b1b78993a811a270..c8125c660677ed48b74a2f47879e9f68931865d1 100644 (file)
 #include "path-util.h"
 #include "pretty-print.h"
 #include "set.h"
+#include "sort-util.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "user-util.h"
-#include "util.h"
 #include "verbs.h"
 
 static enum {
index ab3b979eaf181b9b1a69a1d95d9f940469437583..eb9ccd0cb0896b2e007f4e34e8ca34311894b7ae 100644 (file)
 #include "pretty-print.h"
 #include "process-util.h"
 #include "procfs-util.h"
+#include "sort-util.h"
 #include "stdio-util.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "unit-name.h"
-#include "util.h"
 #include "virt.h"
 
 typedef struct Group {
index b2aa0c600fded6610aca1e859b7f95de1557e864..81f5f9cb722ae3704b06693448bf3f74a1bed5b4 100644 (file)
@@ -17,6 +17,7 @@
 #include "parse-util.h"
 #include "serialize.h"
 #include "set.h"
+#include "sort-util.h"
 #include "special.h"
 #include "stdio-util.h"
 #include "string-table.h"
index 3657e935eeb211e3dd4555155fdc4acadf4564b1..582f6cb249582684cb4d65b69fe90426a7f78856 100644 (file)
 #include "path-util.h"
 #include "selinux-util.h"
 #include "socket-util.h"
+#include "sort-util.h"
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "umask-util.h"
 #include "user-util.h"
-#include "util.h"
 
 #define DEV_MOUNT_OPTIONS (MS_NOSUID|MS_STRICTATIME|MS_NOEXEC)
 
index b0856f45839cf41e12ebd256347f5c541e358718..21c0eaac9fb34182dc1da5722334949b064180dd 100644 (file)
@@ -21,6 +21,7 @@
 #include "mkdir.h"
 #include "path-util.h"
 #include "siphash24.h"
+#include "sort-util.h"
 #include "sparse-endian.h"
 #include "strbuf.h"
 #include "string-util.h"
index 6b4f07c85ffbab9e0b02fc0ba6f739b7d8609367..e0f06a21bbc4b21c72f795fc882d08d5f1df384b 100644 (file)
@@ -27,6 +27,7 @@
 #include "path-util.h"
 #include "random-util.h"
 #include "set.h"
+#include "sort-util.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "strv.h"
index 2778ce40c58d71e286eff206710a0648b1770e8c..a932314e19e61c984356db64ebf9c736ae904730 100644 (file)
@@ -14,9 +14,9 @@
 #include "journal-file.h"
 #include "journal-vacuum.h"
 #include "parse-util.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "time-util.h"
-#include "util.h"
 #include "xattr-util.h"
 
 struct vacuum_info {
index 3460dc09bdc6696c2a1dd1b11590b113bfeec747..1f28c5731f00d350ecb3ee544ee770859cea628b 100644 (file)
@@ -15,6 +15,7 @@
 #include "lldp-network.h"
 #include "memory-util.h"
 #include "socket-util.h"
+#include "sort-util.h"
 #include "string-table.h"
 
 #define LLDP_DEFAULT_NEIGHBORS_MAX 128U
index 9642de10c3e6f74963335baabca8c21c12c24b61..266dd7f1df928452edf5125190881f2d88e5048a 100644 (file)
@@ -10,6 +10,7 @@
 #include "fd-util.h"
 #include "fileio.h"
 #include "hexdecoct.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "strv.h"
 
index f643c6ea3762c3341ee10fbac60a74118956d069..8f2764490a5697801e2cee4022c320a7a23728cd 100644 (file)
@@ -8,9 +8,9 @@
 #include "dirent-util.h"
 #include "fd-util.h"
 #include "set.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "strv.h"
-#include "util.h"
 
 #define DEVICE_ENUMERATE_MAX_DEPTH 256
 
index f8529670b35fa9c6c146cd0ddbfb46ba0781d9e2..dd9bf9e18d6a3b0f30313689a24864f194757e04 100644 (file)
@@ -13,6 +13,7 @@
 #include "label.h"
 #include "mkdir.h"
 #include "path-util.h"
+#include "sort-util.h"
 #include "strbuf.h"
 #include "string-util.h"
 #include "strv.h"
index 5c37279bd20acfe3923da6a79897ef8f5d81c4ec..751144539bcc07ed3175179227290d9b116b9f49 100644 (file)
@@ -6,6 +6,7 @@
 #include "local-addresses.h"
 #include "macro.h"
 #include "netlink-util.h"
+#include "sort-util.h"
 
 static int address_compare(const struct local_address *a, const struct local_address *b) {
         int r;
index 8b97b4d8cef02248f382963a80c67a77fe0b8964..78f5f2ff3238ae4b719c828dfed3aceefcea5130 100644 (file)
 #include "rlimit-util.h"
 #include "sigbus.h"
 #include "signal-util.h"
+#include "sort-util.h"
 #include "spawn-polkit-agent.h"
 #include "stdio-util.h"
 #include "string-table.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "unit-name.h"
-#include "util.h"
 #include "verbs.h"
 #include "web-util.h"
 
index bbbc91c38e3ed4ed1f07fdee851e4c872da32f01..1fc8c954d9d2847bd2b90cac3ede4ad2bae158a4 100644 (file)
 #include "parse-util.h"
 #include "path-util.h"
 #include "pretty-print.h"
+#include "sort-util.h"
 #include "spawn-polkit-agent.h"
 #include "stat-util.h"
 #include "strv.h"
+#include "terminal-util.h"
 #include "unit-def.h"
 #include "unit-name.h"
 #include "user-util.h"
-#include "terminal-util.h"
 
 enum {
         ACTION_DEFAULT,
index 9452dabcde9ab9df75734f47108d3340f722e2d6..86f6435e4f598dd1f884d8c743eeb73d5ab19be8 100644 (file)
@@ -26,6 +26,7 @@
 #include "parse-util.h"
 #include "pretty-print.h"
 #include "socket-util.h"
+#include "sort-util.h"
 #include "sparse-endian.h"
 #include "stdio-util.h"
 #include "string-table.h"
@@ -33,7 +34,6 @@
 #include "strv.h"
 #include "strxcpyx.h"
 #include "terminal-util.h"
-#include "util.h"
 #include "verbs.h"
 
 static PagerFlags arg_pager_flags = 0;
index 13f50b2d37b9cca7f020b2fc4de5e4cdb4a0f8a3..12f557ee99c540b5cc205e618dea9b6128b8f361 100644 (file)
 #include "path-util.h"
 #include "rm-rf.h"
 #include "set.h"
+#include "sort-util.h"
 #include "stat-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "tmpfile-util.h"
 #include "user-util.h"
-#include "util.h"
 
 CustomMount* custom_mount_add(CustomMount **l, size_t *n, CustomMountType t) {
         CustomMount *c, *ret;
index 01fd1a94a0cdaa380347453847dd5fc0d7b12790..9d0d21c11533a59dbc46648ec0f420927ffed9a3 100644 (file)
@@ -24,6 +24,7 @@
 #include "set.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "sort-util.h"
 #include "string-table.h"
 #include "strv.h"
 #include "tmpfile-util.h"
index ad7b623b69f2a69cbbf7e8ce1337736ca5a0e99e..a5ded5ada2020991bb6bfd6b6e076abc0c09e590 100644 (file)
@@ -15,6 +15,7 @@
 #include "memory-util.h"
 #include "resolved-dns-dnssec.h"
 #include "resolved-dns-packet.h"
+#include "sort-util.h"
 #include "string-table.h"
 
 #define VERIFY_RRS_MAX 256
index c5ec93b724485dc61bcb36ec81284c21250d355b..e5a27ca68815b60920857f824950981e429ddbc2 100644 (file)
 #include "fileio.h"
 #include "hexdecoct.h"
 #include "parse-util.h"
-#include "resolved-dns-trust-anchor.h"
 #include "resolved-dns-dnssec.h"
+#include "resolved-dns-trust-anchor.h"
 #include "set.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "strv.h"
 
index 89c2497d32707e48426e07017cee514bf1e3c2d5..67080cb01c408923c63e4ad89d5659cdd8b70271 100644 (file)
@@ -8,6 +8,7 @@
 #include "fd-util.h"
 #include "resolved-manager.h"
 #include "resolved-mdns.h"
+#include "sort-util.h"
 
 #define CLEAR_CACHE_FLUSH(x) (~MDNS_RR_CACHE_FLUSH & (x))
 
index 64b2574a182910f443fe23738504facb5c10b9f5..f2b919b6bb34e13d7f7a94ce5e06939257e74860 100644 (file)
@@ -21,6 +21,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "pe-header.h"
+#include "sort-util.h"
 #include "stat-util.h"
 #include "string-table.h"
 #include "string-util.h"
index 3ea1bd29c90faca14287e7bae7e5dc71cf5cfd0e..d0bfd1894fb9d2ffefe9262feef0b5ab1d8f6a79 100644 (file)
 #include "rlimit-util.h"
 #include "securebits-util.h"
 #include "signal-util.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "syslog-util.h"
 #include "terminal-util.h"
 #include "unit-def.h"
 #include "user-util.h"
 #include "utf8.h"
-#include "util.h"
 
 int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
         assert(message);
index b2285cebdcc0c142ac1b6134e6aa93fa858c6ccc..e7ee90aa9c57f3bc7bcafb2a50fdf216183076c6 100644 (file)
@@ -18,6 +18,7 @@
 #include "macro.h"
 #include "parse-util.h"
 #include "process-util.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "time-util.h"
 
index 61df7511a178b7ea1eabd05823d16fc0403777fc..91a243944c78b9fa914abce1be4fec838c0f0399 100644 (file)
@@ -20,6 +20,7 @@
 #include "output-mode.h"
 #include "path-util.h"
 #include "process-util.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "terminal-util.h"
 #include "unit-name.h"
index 04c0a697b4803fc31b6691370097c85a1d4d1172..4f32163bbaf1467a18ee5511667ea9bcbc79825c 100644 (file)
 #include "io-util.h"
 #include "macro.h"
 #include "parse-util.h"
+#include "sort-util.h"
 #include "stdio-util.h"
 #include "strv.h"
 #include "time-util.h"
 #include "utf8.h"
-#include "util.h"
 #include "virt.h"
 
 #if ENABLE_EFI
index 589ae9e23604211de229e38775a3efd71117c05f..4e8fc808cdbd90dc192e43352b51b5864258741f 100644 (file)
@@ -12,6 +12,7 @@
 #include "pager.h"
 #include "parse-util.h"
 #include "pretty-print.h"
+#include "sort-util.h"
 #include "string-util.h"
 #include "terminal-util.h"
 #include "time-util.h"
index 5fa7bd277eb7d22233f55ade847a241abc7ec1de..7cb7d8a477e9a7533062285726066fa27723b456 100644 (file)
@@ -6,9 +6,9 @@
 
 #include "alloc-util.h"
 #include "macro.h"
+#include "sort-util.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);
index dd62b95669cf8f8daa5dbea70ebdac4f7c9ddf67..7f6196328b12db90ce345a533f209468564fb0ab 100644 (file)
@@ -66,6 +66,7 @@
 #include "sigbus.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "sort-util.h"
 #include "spawn-ask-password-agent.h"
 #include "spawn-polkit-agent.h"
 #include "special.h"
index 53c9e090a70235bb3a3d0289a207f1e5841314b1..21d5b44fbb69454c69f1fec7adbd5cf03ba0d634 100644 (file)
@@ -6,7 +6,7 @@
 #include "prioq.h"
 #include "set.h"
 #include "siphash24.h"
-#include "util.h"
+#include "sort-util.h"
 
 #define SET_SIZE 1024*4
 
index 801e79b01d7c660025d8f65a6fc96c315f01c5a5..ad736002418fade1cb68de6cd92b3dfbb187d1ef 100644 (file)
@@ -53,6 +53,7 @@
 #include "rm-rf.h"
 #include "selinux-util.h"
 #include "set.h"
+#include "sort-util.h"
 #include "specifier.h"
 #include "stat-util.h"
 #include "stdio-util.h"
@@ -61,7 +62,6 @@
 #include "strv.h"
 #include "umask-util.h"
 #include "user-util.h"
-#include "util.h"
 
 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
  * them in the file system. This is intended to be used to create