]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util-lib: move string table stuff into its own string-table.[ch]
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Oct 2015 21:31:05 +0000 (22:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2015 12:25:56 +0000 (13:25 +0100)
69 files changed:
Makefile.am
src/basic/cgroup-util.c
src/basic/locale-util.c
src/basic/log.c
src/basic/rlimit-util.c
src/basic/signal-util.c
src/basic/smack-util.c
src/basic/socket-util.c
src/basic/string-table.c [new file with mode: 0644]
src/basic/string-table.h [new file with mode: 0644]
src/basic/unit-name.c
src/basic/util.c
src/basic/util.h
src/basic/virt.c
src/bus-proxyd/bus-xml-policy.c
src/core/automount.c
src/core/bus-policy.c
src/core/busname.c
src/core/cgroup.c
src/core/execute.c
src/core/failure-action.c
src/core/job.c
src/core/kill.c
src/core/manager.c
src/core/mount.c
src/core/namespace.c
src/core/path.c
src/core/scope.c
src/core/service.c
src/core/show-status.c
src/core/socket.c
src/core/swap.c
src/core/timer.c
src/import/import-compress.c
src/import/importd.c
src/journal-remote/journal-remote.c
src/journal/compress.c
src/journal/coredump.c
src/journal/journald-server.c
src/libsystemd-network/sd-dhcp6-client.c
src/libsystemd/sd-device/device-private.c
src/libsystemd/sd-netlink/netlink-types.c
src/login/logind-action.c
src/login/logind-inhibit.c
src/login/logind-session.c
src/login/logind-user.c
src/machine/machine.c
src/network/networkctl.c
src/network/networkd-link.c
src/network/networkd-netdev-bond.c
src/network/networkd-netdev-ipvlan.c
src/network/networkd-netdev-macvlan.c
src/network/networkd-netdev-tunnel.c
src/network/networkd-netdev.c
src/network/networkd-network.c
src/network/networkd-util.c
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-manager.c
src/rfkill/rfkill.c
src/shared/architecture.c
src/shared/condition.c
src/shared/import-util.c
src/shared/install.c
src/shared/logs-show.c
src/shared/machine-image.c
src/tmpfiles/tmpfiles.c
src/udev/net/ethtool-util.c
src/udev/net/link-config.c

index 6f819cb9f2326ddb4b2cc0168026eec66f075ed6..56715f6351eb4e78186516ada58524889fbfc3c5 100644 (file)
@@ -823,6 +823,8 @@ libbasic_la_SOURCES = \
        src/basic/locale-util.h \
        src/basic/signal-util.c \
        src/basic/signal-util.h \
+       src/basic/string-table.c \
+       src/basic/string-table.h \
        src/basic/mempool.c \
        src/basic/mempool.h \
        src/basic/hashmap.c \
index 84aea8afb8c4c742e90e93de9650a7e522ff0d75..d416b0b41e2ff39f6db63fd248b3d4dbe32e0575 100644 (file)
@@ -44,6 +44,7 @@
 #include "process-util.h"
 #include "set.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "unit-name.h"
 #include "user-util.h"
index 08da4b98c5448c9e9d03b3d44575344f498d425c..9db906316b7d2596f5671ddabce2ded7edceac40 100644 (file)
@@ -26,6 +26,7 @@
 #include "locale-util.h"
 #include "path-util.h"
 #include "set.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "utf8.h"
index 2c0abdc0bdcefb027654195cbde529d6e39b0270..dcb24cfab78e41db00792ae98dcd850eb78ce2fe 100644 (file)
@@ -39,6 +39,7 @@
 #include "process-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "terminal-util.h"
 #include "util.h"
index 7f9d63224d3696d549cdd2a54d407bd61dfe5237..2627c813fc8c8a355d9a253f9dabe49169bbea24 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "missing.h"
 #include "rlimit-util.h"
+#include "string-table.h"
 #include "util.h"
 
 int setrlimit_closest(int resource, const struct rlimit *rlim) {
index e5ac6317d404e37965d809914e76f634986f9c8e..8038bc891d52a3e963dca591da7394db9207814b 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "parse-util.h"
 #include "signal-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index 5ada621ca331cc00ef0fe394c93574196f6ffe76..a96fb5b59418c5d3d6c7403e6d6c0625fdc6a59d 100644 (file)
@@ -27,6 +27,7 @@
 #include "path-util.h"
 #include "process-util.h"
 #include "smack-util.h"
+#include "string-table.h"
 #include "util.h"
 #include "xattr-util.h"
 
index c4af6aa9410a161ed17d214705f0e6ffcb19b3ea..71a52a840ae3eefc73c44be6be8114cb400946c4 100644 (file)
@@ -38,6 +38,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
diff --git a/src/basic/string-table.c b/src/basic/string-table.c
new file mode 100644 (file)
index 0000000..a860324
--- /dev/null
@@ -0,0 +1,35 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2010 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "string-table.h"
+
+ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
+        size_t i;
+
+        if (!key)
+                return -1;
+
+        for (i = 0; i < len; ++i)
+                if (streq_ptr(table[i], key))
+                        return (ssize_t) i;
+
+        return -1;
+}
diff --git a/src/basic/string-table.h b/src/basic/string-table.h
new file mode 100644 (file)
index 0000000..51b6007
--- /dev/null
@@ -0,0 +1,88 @@
+
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2010 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "macro.h"
+#include "parse-util.h"
+#include "string-util.h"
+
+ssize_t string_table_lookup(const char * const *table, size_t len, const char *key);
+
+/* For basic lookup tables with strictly enumerated entries */
+#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope)          \
+        scope const char *name##_to_string(type i) {                    \
+                if (i < 0 || i >= (type) ELEMENTSOF(name##_table))      \
+                        return NULL;                                    \
+                return name##_table[i];                                 \
+        }
+
+#define _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope)        \
+        scope type name##_from_string(const char *s) {                  \
+                return (type) string_table_lookup(name##_table, ELEMENTSOF(name##_table), s); \
+        }
+
+#define _DEFINE_STRING_TABLE_LOOKUP(name,type,scope)                    \
+        _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope)          \
+        _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope)        \
+        struct __useless_struct_to_allow_trailing_semicolon__
+
+#define DEFINE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,)
+#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,static)
+#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,static)
+#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,static)
+
+/* For string conversions where numbers are also acceptable */
+#define DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(name,type,max)         \
+        int name##_to_string_alloc(type i, char **str) {                \
+                char *s;                                                \
+                if (i < 0 || i > max)                                   \
+                        return -ERANGE;                                 \
+                if (i < (type) ELEMENTSOF(name##_table)) {              \
+                        s = strdup(name##_table[i]);                    \
+                        if (!s)                                         \
+                                return -ENOMEM;                         \
+                } else {                                                \
+                        if (asprintf(&s, "%i", i) < 0)                  \
+                                return -ENOMEM;                         \
+                }                                                       \
+                *str = s;                                               \
+                return 0;                                               \
+        }                                                               \
+        type name##_from_string(const char *s) {                        \
+                type i;                                                 \
+                unsigned u = 0;                                         \
+                if (!s)                                                 \
+                        return (type) -1;                               \
+                for (i = 0; i < (type) ELEMENTSOF(name##_table); i++)   \
+                        if (streq_ptr(name##_table[i], s))              \
+                                return i;                               \
+                if (safe_atou(s, &u) >= 0 && u <= max)                  \
+                        return (type) u;                                \
+                return (type) -1;                                       \
+        }                                                               \
+        struct __useless_struct_to_allow_trailing_semicolon__
index c6ba9afb5a68ab02b86ad7e71186556870d9ea0b..43f52ce7c8eb0e8511b5d7497341c9f9b002a39b 100644 (file)
 
 #include "bus-label.h"
 #include "def.h"
+#include "hexdecoct.h"
 #include "path-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
-#include "util.h"
 #include "unit-name.h"
-#include "hexdecoct.h"
+#include "util.h"
 
 #define VALID_CHARS                             \
         DIGITS LETTERS                          \
index 30691dea6bc1fcbaab553acd27d0036d3be7d9c5..0878adbfac67a182702d494da7c517e6d37be8ea 100644 (file)
@@ -94,6 +94,7 @@
 #include "random-util.h"
 #include "signal-util.h"
 #include "sparse-endian.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
@@ -1450,19 +1451,6 @@ int syslog_parse_priority(const char **p, int *priority, bool with_facility) {
         return 1;
 }
 
-ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) {
-        size_t i;
-
-        if (!key)
-                return -1;
-
-        for (i = 0; i < len; ++i)
-                if (streq_ptr(table[i], key))
-                        return (ssize_t) i;
-
-        return -1;
-}
-
 int version(void) {
         puts(PACKAGE_STRING "\n"
              SYSTEMD_FEATURES);
index 6c6920c2a443db56bbf9e33a715244356a6f44bc..d18b151d887854c075dda1ae0b8e27b0bb3f36cd 100644 (file)
@@ -83,62 +83,6 @@ static inline const char* one_zero(bool b) {
         return b ? "1" : "0";
 }
 
-/* For basic lookup tables with strictly enumerated entries */
-#define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope)          \
-        scope const char *name##_to_string(type i) {                    \
-                if (i < 0 || i >= (type) ELEMENTSOF(name##_table))      \
-                        return NULL;                                    \
-                return name##_table[i];                                 \
-        }
-
-ssize_t string_table_lookup(const char * const *table, size_t len, const char *key);
-
-#define _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope)        \
-        scope type name##_from_string(const char *s) {                  \
-                return (type) string_table_lookup(name##_table, ELEMENTSOF(name##_table), s); \
-        }
-
-#define _DEFINE_STRING_TABLE_LOOKUP(name,type,scope)                    \
-        _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope)          \
-        _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,scope)        \
-        struct __useless_struct_to_allow_trailing_semicolon__
-
-#define DEFINE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,)
-#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) _DEFINE_STRING_TABLE_LOOKUP(name,type,static)
-#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,static)
-#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(name,type) _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING(name,type,static)
-
-/* For string conversions where numbers are also acceptable */
-#define DEFINE_STRING_TABLE_LOOKUP_WITH_FALLBACK(name,type,max)         \
-        int name##_to_string_alloc(type i, char **str) {                \
-                char *s;                                                \
-                if (i < 0 || i > max)                                   \
-                        return -ERANGE;                                 \
-                if (i < (type) ELEMENTSOF(name##_table)) {              \
-                        s = strdup(name##_table[i]);                    \
-                        if (!s)                                         \
-                                return -ENOMEM;                         \
-                } else {                                                \
-                        if (asprintf(&s, "%i", i) < 0)                  \
-                                return -ENOMEM;                         \
-                }                                                       \
-                *str = s;                                               \
-                return 0;                                               \
-        }                                                               \
-        type name##_from_string(const char *s) {                        \
-                type i;                                                 \
-                unsigned u = 0;                                         \
-                if (!s)                                                 \
-                        return (type) -1;                               \
-                for (i = 0; i < (type) ELEMENTSOF(name##_table); i++)   \
-                        if (streq_ptr(name##_table[i], s))              \
-                                return i;                               \
-                if (safe_atou(s, &u) >= 0 && u <= max)                  \
-                        return (type) u;                                \
-                return (type) -1;                                       \
-        }                                                               \
-        struct __useless_struct_to_allow_trailing_semicolon__
-
 bool fstype_is_network(const char *fstype);
 
 #define xsprintf(buf, fmt, ...) \
index 9267a2730b21da96a63c770adadd4a7d2b172b25..9076cf618f2c53bdd13dcacf41229701a142e5a1 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "fileio.h"
 #include "process-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 #include "virt.h"
index 56dcfeab62252cb5b47891adf6d4b292090ef7c0..cf922ef02f37df1eaa569ef85e01e5f842db15a2 100644 (file)
@@ -27,6 +27,7 @@
 #include "fileio.h"
 #include "formats-util.h"
 #include "set.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
index 00911118e6111cc1faff3e4bf74db90aa24c2f18..379f71f74a60eb7bb03cf877fe338a6b5e76f549 100644 (file)
@@ -45,6 +45,7 @@
 #include "path-util.h"
 #include "process-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "unit-name.h"
 #include "unit.h"
index 2490903a8c21f095f57f94f09e864a4167eeb38a..7ad18fb28c120aa240b5c8a79a9d4e6b1006b190 100644 (file)
@@ -22,6 +22,7 @@
 #include "bus-kernel.h"
 #include "bus-policy.h"
 #include "kdbus.h"
+#include "string-table.h"
 #include "user-util.h"
 #include "util.h"
 
index df4a8bef52bb2e521acbf61e23331c9820b8a39c..94674c99fa2b94c35cacaf5287442d641da215a1 100644 (file)
@@ -34,6 +34,7 @@
 #include "service.h"
 #include "signal-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 
 static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = {
index 6ef0580fad08ee1e6af73c306e57fdf0ae4ffba0..0d37e69cd9efc062cd4274f8138e26146d23fc7e 100644 (file)
@@ -30,6 +30,7 @@
 #include "path-util.h"
 #include "process-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 
 #define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
index a9564386ba35364694b8317f05cdbad27ffbb0e9..f3542163252bc3882359548ae22026451710ae84 100644 (file)
@@ -89,6 +89,7 @@
 #include "selinux-util.h"
 #include "signal-util.h"
 #include "smack-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
index 3412accf3e6b4cd4cf6c85a7d58a375bfe246322..c7c95984b7be2cd0c9e12975c212d792b575db82 100644 (file)
 #include <sys/reboot.h>
 #include <linux/reboot.h>
 
-#include "bus-util.h"
 #include "bus-error.h"
-#include "special.h"
+#include "bus-util.h"
 #include "failure-action.h"
+#include "special.h"
+#include "string-table.h"
 #include "terminal-util.h"
 
 static void log_and_status(Manager *m, const char *message) {
index 7fde88f5fe58bf944a7be6ad3cabb47003849626..44532d0d5a9d953df5c32a0acb9f42a3ba7e6d6b 100644 (file)
@@ -34,6 +34,7 @@
 #include "parse-util.h"
 #include "set.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
index bddfa4460f9b7e3c163a7a5bb8a4ce75818825c9..1466d5ce64335021b30738875b3c658beb7e8755 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
-#include "signal-util.h"
 #include "kill.h"
+#include "signal-util.h"
+#include "string-table.h"
+#include "util.h"
 
 void kill_context_init(KillContext *c) {
         assert(c);
index 51e8b0566fccbee6d8d452d066553e835cb882fc..83068af77ec2e658744307d9a608a030c2b35369 100644 (file)
@@ -73,6 +73,7 @@
 #include "signal-util.h"
 #include "special.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "terminal-util.h"
index 9d8b55da58990966f266b13a8a497a44b83d2023..f04f3869303883bc368e162d59fd347c90155d15 100644 (file)
@@ -41,6 +41,7 @@
 #include "smack-util.h"
 #include "special.h"
 #include "string-util.h"
+#include "string-table.h"
 #include "strv.h"
 #include "unit-name.h"
 #include "unit.h"
index e6c381800b92921fa91c9dd9d91798bd6dfaf226..ec7180ebdc6751d815bf840e7cdb4f5efe290f7b 100644 (file)
@@ -38,6 +38,7 @@
 #include "path-util.h"
 #include "selinux-util.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"
index efd97d44eb965c07a96d3b43768f7ee31b4d9c37..761ec265b485e6c2b184652a8ce30ef7350ed8bc 100644 (file)
@@ -33,6 +33,7 @@
 #include "path.h"
 #include "special.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "unit-name.h"
 #include "unit.h"
index 9f72851382592d74bd2745b656bd7ffef310ce8a..13de02cf16fbe04a164eb7741c62703905cbf65b 100644 (file)
@@ -26,6 +26,7 @@
 #include "load-dropin.h"
 #include "log.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
index bb77f4502d1a672ceded22a71dbcf9dc252ef13e..54a420d6f09d76f872fb4dc048908b9454e29812 100644 (file)
@@ -46,6 +46,7 @@
 #include "service.h"
 #include "signal-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
index 9e4c9f563eff4621dc72f5a98fbfca5f01208c95..9509b21ccbd44eb592b55271ae24ff470afc86c1 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
+#include "fd-util.h"
 #include "parse-util.h"
 #include "show-status.h"
 #include "string-util.h"
+#include "terminal-util.h"
 #include "util.h"
 
 int parse_show_status(const char *v, ShowStatus *ret) {
index 8ea7bd9af422d3fa343dc3f1b3bb2229a8fad0be..c145aa6081fb087d53f40c1171e68fd1bb65a45a 100644 (file)
@@ -50,6 +50,7 @@
 #include "smack-util.h"
 #include "socket.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
index c4151c6afdece483e1cb23057f4bdef6194f79b6..cb2da1cb5c53803030ee2aa64b0d0b51dbe56277 100644 (file)
@@ -35,6 +35,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "swap.h"
 #include "udev-util.h"
index 26d94eb521757d57d67551107b907b8ab531e572..47e501815ad3ac7813c9804d176c43024a8ccde1 100644 (file)
@@ -27,6 +27,7 @@
 #include "fs-util.h"
 #include "parse-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "timer.h"
 #include "unit-name.h"
index d6b81330361199d9f3aef903831d20ff1756f0f1..d4ff178f60bbc68fc607999667467744b800d375 100644 (file)
@@ -19,8 +19,9 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "util.h"
 #include "import-compress.h"
+#include "string-table.h"
+#include "util.h"
 
 void import_compress_free(ImportCompress *c) {
         assert(c);
index 975907e3c922d9f3efca32af6eff840fad0860ce..2a03507d3a66a566815ab452f2ac3e2aa42423fa 100644 (file)
@@ -37,6 +37,7 @@
 #include "process-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "strv.h"
 #include "util.h"
 
index b53b2abd760cf27c43a1902964f1b60b8b334075..dc87b2102096cc2f620fc1aec7a11c651b89a408 100644 (file)
@@ -48,6 +48,7 @@
 #include "signal-util.h"
 #include "socket-util.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 
index 9308e8b789b4f2a53119423fbcb9fb343b778a05..196d6ff4252a4ae46cf5f24b5b9f162cab106cf9 100644 (file)
@@ -39,6 +39,7 @@
 #include "journal-def.h"
 #include "macro.h"
 #include "sparse-endian.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index 1756a823a92d0f0df5f0cf1414cddc4a3fed937f..257a665819a4f0a3b2e49cd18eba915f1bdcbd04 100644 (file)
@@ -53,6 +53,7 @@
 #include "process-util.h"
 #include "special.h"
 #include "stacktrace.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
index a474293a8730a6da709cea1180de5796b39885cd..ab213f705dacd7173fcdb1fc93f5dc988812834b 100644 (file)
@@ -62,6 +62,7 @@
 #include "selinux-util.h"
 #include "signal-util.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "string-util.h"
 
 #define USER_JOURNALS_MAX 1024
index ade1b470d449689507b5911f86e0a37807f19940..559c5e4df4d232cc88ae8345f17cc560f3a1df61 100644 (file)
@@ -33,6 +33,7 @@
 #include "fd-util.h"
 #include "network-internal.h"
 #include "random-util.h"
+#include "string-table.h"
 #include "util.h"
 
 #define MAX_MAC_ADDR_LEN INFINIBAND_ALEN
index da325c9d2814e6a392ac52d8374d82167aebac3b..daed321bd84df1570aa1a4bdea1d4718840d0f1c 100644 (file)
@@ -37,6 +37,7 @@
 #include "path-util.h"
 #include "refcnt.h"
 #include "set.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "strxcpyx.h"
index 4a5340e659248dac68e85f595aa7c4cccb98f701..cf0a6248d61ef6b0e4211d7026e9b55e44afa5a0 100644 (file)
 #include <linux/if_bridge.h>
 #include <linux/if_addr.h>
 #include <linux/if.h>
-
 #include <linux/ip.h>
 #include <linux/if_link.h>
 #include <linux/if_tunnel.h>
 
 #include "macro.h"
-#include "util.h"
-
-#include "netlink-types.h"
 #include "missing.h"
+#include "netlink-types.h"
+#include "string-table.h"
+#include "util.h"
 
 /* Maximum ARP IP target defined in kernel */
 #define BOND_MAX_ARP_TARGETS    16
index f06f8edc0714473ade8430ba97b082d95c5172d6..8c452456a04946b4f151f8a0d4ebd79d0c403990 100644 (file)
 
 #include <unistd.h>
 
-#include "conf-parser.h"
-#include "special.h"
-#include "sleep-config.h"
-#include "bus-util.h"
 #include "bus-error.h"
-#include "logind-action.h"
+#include "bus-util.h"
+#include "conf-parser.h"
 #include "formats-util.h"
+#include "logind-action.h"
 #include "process-util.h"
+#include "sleep-config.h"
+#include "special.h"
+#include "string-table.h"
 #include "terminal-util.h"
 #include "user-util.h"
 
index 460c2f0bd8d1546e686618dd85fc80e682562c28..92b580709410e19d9960241f536705db699ca5b1 100644 (file)
@@ -31,6 +31,7 @@
 #include "logind-inhibit.h"
 #include "mkdir.h"
 #include "parse-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "user-util.h"
 #include "util.h"
index 9651d3e24afe2d420d08d07aede00be429f86689..829b614509586e891efa5735d85172b0ef7e907f 100644 (file)
@@ -43,6 +43,7 @@
 #include "mkdir.h"
 #include "parse-util.h"
 #include "path-util.h"
+#include "string-table.h"
 #include "terminal-util.h"
 #include "user-util.h"
 #include "util.h"
index 925190b603fb250dbfff324aa666fa6ea3fdd01a..9692a867092fad17ef1b8bf6ff49a62e487962f6 100644 (file)
@@ -43,6 +43,7 @@
 #include "rm-rf.h"
 #include "smack-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "unit-name.h"
 #include "util.h"
 
index 7aff55b761d9f1db2ebaf0fdacff10047b01f049..2889cb320542e0fc4bb834aa4ff176ec984f510f 100644 (file)
@@ -37,6 +37,7 @@
 #include "mkdir.h"
 #include "parse-util.h"
 #include "special.h"
+#include "string-table.h"
 #include "terminal-util.h"
 #include "unit-name.h"
 #include "util.h"
index be679acca0e62eb0878b2d519bd65f0cf6f882ea..6ea9563fcfd4cfe417de642ac47af8320ab50e43 100644 (file)
@@ -39,6 +39,7 @@
 #include "parse-util.h"
 #include "socket-util.h"
 #include "string-util.h"
+#include "string-table.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "util.h"
index 1144c82c17915e7ffd38a1b94e6b771770adfe17..de49fd5c227439ec954655eba4a481ccfe4544fe 100644 (file)
@@ -33,6 +33,7 @@
 #include "networkd-netdev.h"
 #include "set.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "udev-util.h"
 #include "util.h"
 #include "virt.h"
index afc1efdcf7b3b0cd6e01ebcfcf0f4a5511bd63f6..ce9c18d654899fd94665098931bf44fcff09d79b 100644 (file)
@@ -27,8 +27,9 @@
 
 #include "conf-parser.h"
 #include "missing.h"
-#include "string-util.h"
 #include "networkd-netdev-bond.h"
+#include "string-util.h"
+#include "string-table.h"
 
 /*
  * Number of seconds between instances where the bonding
index fb0aed0dcbcc7dfc8fcb6e419ffe7055f3dbbf0e..27cb7d1bf012da15f4921793329436f80ea04ff8 100644 (file)
@@ -21,8 +21,9 @@
 
 #include <net/if.h>
 
-#include "networkd-netdev-ipvlan.h"
 #include "conf-parser.h"
+#include "networkd-netdev-ipvlan.h"
+#include "string-table.h"
 
 static const char* const ipvlan_mode_table[_NETDEV_IPVLAN_MODE_MAX] = {
         [NETDEV_IPVLAN_MODE_L2] = "L2",
index e17de793ce64afd3d30e1a1f6f06582714612a87..7144823b2da17d47ea344a42d5a7de56ff2c3792 100644 (file)
@@ -21,8 +21,9 @@
 
 #include <net/if.h>
 
-#include "networkd-netdev-macvlan.h"
 #include "conf-parser.h"
+#include "networkd-netdev-macvlan.h"
+#include "string-table.h"
 
 static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = {
         [NETDEV_MACVLAN_MODE_PRIVATE] = "private",
index 2dd16be3817c211463b5cc5a1c738a5d28f89232..385338849f40a317495c760a994c5a2b4d7e9474 100644 (file)
@@ -32,6 +32,7 @@
 #include "networkd-link.h"
 #include "networkd-netdev-tunnel.h"
 #include "parse-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index 0ed52a8d68949572d9a6bf1aebeb3927b544d774..5060888a2f7e0a33042fba53a036f9c7e16634e2 100644 (file)
@@ -31,6 +31,7 @@
 #include "networkd.h"
 #include "siphash24.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 
 const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = {
index eeb03df517d8367cfb493cb0af4884a7e033b4f4..c8c6f5df1172d77527bde37d754d43a4b4311536 100644 (file)
@@ -32,6 +32,7 @@
 #include "networkd.h"
 #include "parse-util.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index 3ada0ce32b2e62e1d2a3597dca0e30fb130445fc..17165266efed6e42df09982d7b30b6d16b722a72 100644 (file)
@@ -22,6 +22,7 @@
 #include "conf-parser.h"
 #include "networkd-util.h"
 #include "parse-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index bebd1ee4a6e55f64d32ddd80c496d2b520769bdb..f7f936d3435581d5ee094c8fef19193540421c8f 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
  ***/
 
-#include "utf8.h"
-#include "util.h"
-#include "strv.h"
-#include "unaligned.h"
 #include "dns-domain.h"
 #include "resolved-dns-packet.h"
+#include "string-table.h"
+#include "strv.h"
+#include "unaligned.h"
+#include "utf8.h"
+#include "util.h"
 
 int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
         DnsPacket *p;
index 84472ca1bc9edb306c2c4652373ad102e134e8eb..1e38547e23eecfcaf9557385282bfe191873507d 100644 (file)
@@ -26,6 +26,7 @@
 #include "random-util.h"
 #include "resolved-dns-transaction.h"
 #include "resolved-llmnr.h"
+#include "string-table.h"
 
 DnsTransaction* dns_transaction_free(DnsTransaction *t) {
         DnsQuery *q;
index a6aac196dbf41a11ebc6268b9cfb7b30e97486b2..b9c625b9cf27f63c2ec5f451e2c4e650262e5bd5 100644 (file)
@@ -40,6 +40,7 @@
 #include "resolved-llmnr.h"
 #include "resolved-manager.h"
 #include "socket-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "utf8.h"
 
index 559a17653531c84aa6df86408f55b1cb6ceeea51..c08b746f2c8dd9019d9916990798c16d912f9856 100644 (file)
@@ -31,6 +31,7 @@
 #include "io-util.h"
 #include "mkdir.h"
 #include "parse-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "udev-util.h"
 #include "util.h"
index e5efcd77b6601bc68668576323d170f5be138e39..e2efa4272b7c556f46f385169a2ed0a5329e312d 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <sys/utsname.h>
 
+#include "string-table.h"
 #include "string-util.h"
 #include "architecture.h"
 
index 1c4c9419d0945a6e97433ada5388634c86c0e66e..a79a74eaa5193888c60206bf25cf213553b95992 100644 (file)
@@ -42,6 +42,7 @@
 #include "selinux-util.h"
 #include "smack-util.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 #include "virt.h"
index b50e86b944ba4f497bd61a44af171944c7084e86..bf5395dee8866fab1233cef81b79e1392353278d 100644 (file)
@@ -22,6 +22,7 @@
 #include "btrfs-util.h"
 #include "import-util.h"
 #include "path-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "util.h"
 
index df381358f8790838ebbedaf39f954f90846d48e4..1f63ae9ce0e6866ba5049b6aa05c35b74c86835a 100644 (file)
@@ -39,6 +39,7 @@
 #include "set.h"
 #include "special.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "unit-name.h"
index 3519323b7ae4b184f9bf52dcada9016c8dd87ce5..5b4a220e5fb75a7dd918a3a0174eae0e64f4f299 100644 (file)
@@ -35,6 +35,7 @@
 #include "logs-show.h"
 #include "parse-util.h"
 #include "process-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "terminal-util.h"
 #include "utf8.h"
index 3f12a67b54fdce5b2a5d31897ee2dd143f971447..a4e77fb8d89499b48bf7209970396ea433e8ed22 100644 (file)
@@ -33,6 +33,7 @@
 #include "mkdir.h"
 #include "path-util.h"
 #include "rm-rf.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "utf8.h"
index 3b9fdf4378544960f08a12d35c86f5ba68506cda..9440ce7bb6a5de0238b7fe2939a1489638a1fb6a 100644 (file)
@@ -62,6 +62,7 @@
 #include "set.h"
 #include "specifier.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "user-util.h"
index a4b05d1becd5a6b261ef67fbe6e05bca59924fb4..0647008d90df2810c7dbac425f3372f42dc5817e 100644 (file)
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include <sys/ioctl.h>
 #include <net/if.h>
+#include <sys/ioctl.h>
 #include <linux/ethtool.h>
 #include <linux/sockios.h>
 
+#include "conf-parser.h"
 #include "ethtool-util.h"
-
+#include "log.h"
+#include "string-table.h"
 #include "strxcpyx.h"
 #include "util.h"
-#include "log.h"
-#include "conf-parser.h"
 
 static const char* const duplex_table[_DUP_MAX] = {
         [DUP_FULL] = "full",
index b4807dc0f72e78881bd2e93f28ce51c10949ccd1..db4fe0c855353cd0d8ca575688c466aa5249856d 100644 (file)
@@ -38,6 +38,7 @@
 #include "path-util.h"
 #include "random-util.h"
 #include "stat-util.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
 #include "util.h"