summaryrefslogtreecommitdiff
path: root/src/bus-proxyd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-24 22:58:24 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:05:02 +0200
commit07630cea1f3a845c09309f197ac7c4f11edd3b62 (patch)
treeaf80c7221d1466fac79a7f3a57e0d63a96f464d4 /src/bus-proxyd
parent4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 (diff)
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
Diffstat (limited to 'src/bus-proxyd')
-rw-r--r--src/bus-proxyd/bus-proxyd.c1
-rw-r--r--src/bus-proxyd/bus-xml-policy.c14
-rw-r--r--src/bus-proxyd/driver.c11
-rw-r--r--src/bus-proxyd/proxy.h1
-rw-r--r--src/bus-proxyd/synthesize.c5
-rw-r--r--src/bus-proxyd/synthesize.h1
-rw-r--r--src/bus-proxyd/test-bus-xml-policy.c10
7 files changed, 26 insertions, 17 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index 64d1c5231f..e558578bd0 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -40,6 +40,7 @@
#include "formats-util.h"
#include "log.h"
#include "proxy.h"
+#include "string-util.h"
#include "strv.h"
#include "util.h"
diff --git a/src/bus-proxyd/bus-xml-policy.c b/src/bus-proxyd/bus-xml-policy.c
index 91717653c2..c5a1e09cf8 100644
--- a/src/bus-proxyd/bus-xml-policy.c
+++ b/src/bus-proxyd/bus-xml-policy.c
@@ -19,15 +19,17 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "xml.h"
+#include "sd-login.h"
+
+#include "bus-internal.h"
+#include "conf-files.h"
#include "fileio.h"
-#include "strv.h"
+#include "formats-util.h"
#include "set.h"
-#include "conf-files.h"
-#include "bus-internal.h"
+#include "string-util.h"
+#include "strv.h"
+#include "xml.h"
#include "bus-xml-policy.h"
-#include "sd-login.h"
-#include "formats-util.h"
static void policy_item_free(PolicyItem *i) {
assert(i);
diff --git a/src/bus-proxyd/driver.c b/src/bus-proxyd/driver.c
index fa4aee691a..4e859412f8 100644
--- a/src/bus-proxyd/driver.c
+++ b/src/bus-proxyd/driver.c
@@ -21,21 +21,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <string.h>
#include <errno.h>
#include <stddef.h>
+#include <string.h>
-#include "util.h"
#include "sd-bus.h"
+
#include "bus-internal.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "strv.h"
-#include "set.h"
#include "driver.h"
+#include "env-util.h"
#include "proxy.h"
+#include "set.h"
+#include "strv.h"
#include "synthesize.h"
-#include "env-util.h"
+#include "util.h"
static int get_creds_by_name(sd_bus *bus, const char *name, uint64_t mask, sd_bus_creds **_creds, sd_bus_error *error) {
_cleanup_bus_creds_unref_ sd_bus_creds *c = NULL;
diff --git a/src/bus-proxyd/proxy.h b/src/bus-proxyd/proxy.h
index 6aac650ac9..7b2e5d422f 100644
--- a/src/bus-proxyd/proxy.h
+++ b/src/bus-proxyd/proxy.h
@@ -22,6 +22,7 @@
***/
#include "sd-bus.h"
+
#include "bus-xml-policy.h"
typedef struct Proxy Proxy;
diff --git a/src/bus-proxyd/synthesize.c b/src/bus-proxyd/synthesize.c
index 15d99103f6..7f1f9dc28d 100644
--- a/src/bus-proxyd/synthesize.c
+++ b/src/bus-proxyd/synthesize.c
@@ -23,13 +23,14 @@
#include <stddef.h>
-#include "util.h"
#include "sd-bus.h"
+
#include "bus-internal.h"
+#include "bus-match.h"
#include "bus-message.h"
#include "bus-util.h"
-#include "bus-match.h"
#include "synthesize.h"
+#include "util.h"
int synthetic_driver_send(sd_bus *b, sd_bus_message *m) {
int r;
diff --git a/src/bus-proxyd/synthesize.h b/src/bus-proxyd/synthesize.h
index b596daddf2..ddfe2fd266 100644
--- a/src/bus-proxyd/synthesize.h
+++ b/src/bus-proxyd/synthesize.h
@@ -22,6 +22,7 @@
***/
#include "sd-bus.h"
+
#include "proxy.h"
int synthetic_driver_send(sd_bus *b, sd_bus_message *m);
diff --git a/src/bus-proxyd/test-bus-xml-policy.c b/src/bus-proxyd/test-bus-xml-policy.c
index d19d0e1b60..cb7ff6b970 100644
--- a/src/bus-proxyd/test-bus-xml-policy.c
+++ b/src/bus-proxyd/test-bus-xml-policy.c
@@ -19,15 +19,17 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <unistd.h>
#include <errno.h>
#include <stddef.h>
+#include <unistd.h>
-#include "log.h"
-#include "util.h"
#include "sd-bus.h"
-#include "strv.h"
+
#include "bus-xml-policy.h"
+#include "log.h"
+#include "string-util.h"
+#include "strv.h"
+#include "util.h"
static int test_policy_load(Policy *p, const char *name) {
_cleanup_free_ char *path = NULL;