summaryrefslogtreecommitdiff
path: root/src/journal-remote
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-25 13:14:12 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-25 13:19:18 +0100
commit3ffd4af22052963e7a29431721ee204e634bea75 (patch)
treefe60142dfddd37cfc02b7a135542107e772b36c3 /src/journal-remote
parent04c0136989b7eb896bfb0fb176e11233d69e1453 (diff)
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them over.
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/journal-gatewayd.c13
-rw-r--r--src/journal-remote/journal-remote-parse.c3
-rw-r--r--src/journal-remote/journal-remote.c3
-rw-r--r--src/journal-remote/journal-upload.c3
4 files changed, 13 insertions, 9 deletions
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index b839e5979b..92ef723aff 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -19,21 +19,22 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
#include <fcntl.h>
#include <getopt.h>
-#include <microhttpd.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
+#include <microhttpd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
-#include "sd-journal.h"
-#include "sd-daemon.h"
#include "sd-bus.h"
+#include "sd-daemon.h"
+#include "sd-journal.h"
#include "bus-util.h"
+#include "fd-util.h"
#include "fileio.h"
#include "hostname-util.h"
#include "log.h"
diff --git a/src/journal-remote/journal-remote-parse.c b/src/journal-remote/journal-remote-parse.c
index e9bca39a20..bb299e378c 100644
--- a/src/journal-remote/journal-remote-parse.c
+++ b/src/journal-remote/journal-remote-parse.c
@@ -19,9 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "fd-util.h"
+#include "journal-remote-parse.h"
#include "journald-native.h"
#include "string-util.h"
-#include "journal-remote-parse.h"
#define LINE_CHUNK 8*1024u
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 27385d9b94..de207f8d24 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -37,16 +37,17 @@
#include "conf-parser.h"
#include "escape.h"
+#include "fd-util.h"
#include "fileio.h"
#include "journal-file.h"
#include "journal-remote-write.h"
+#include "journal-remote.h"
#include "journald-native.h"
#include "macro.h"
#include "signal-util.h"
#include "socket-util.h"
#include "string-util.h"
#include "strv.h"
-#include "journal-remote.h"
#define REMOTE_JOURNAL_PATH "/var/log/journal/remote"
diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c
index 471a8cad49..a945a9971a 100644
--- a/src/journal-remote/journal-upload.c
+++ b/src/journal-remote/journal-upload.c
@@ -28,15 +28,16 @@
#include "sd-daemon.h"
#include "conf-parser.h"
+#include "fd-util.h"
#include "fileio.h"
#include "formats-util.h"
+#include "journal-upload.h"
#include "log.h"
#include "mkdir.h"
#include "sigbus.h"
#include "signal-util.h"
#include "string-util.h"
#include "util.h"
-#include "journal-upload.h"
#define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-upload.pem"
#define CERT_FILE CERTIFICATE_ROOT "/certs/journal-upload.pem"