summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-05 16:01:58 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-05 16:01:58 +0100
commit81527be142678057215665be66e4b3c8306a7ab3 (patch)
treea39e22ecc52afb01ed7c060a52d68185ee43051a /src/journal
parent67e5cc4f3ed41feaed399cfed77c6fbb41e14a8c (diff)
build-sys: move public header files into a dir of their own
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-def.h3
-rw-r--r--src/journal/journal-file.h3
-rw-r--r--src/journal/journal-internal.h3
-rw-r--r--src/journal/journalctl.c3
-rw-r--r--src/journal/journald.c9
-rw-r--r--src/journal/sd-journal.h124
-rw-r--r--src/journal/test-journal.c3
7 files changed, 15 insertions, 133 deletions
diff --git a/src/journal/journal-def.h b/src/journal/journal-def.h
index ef0cb6dae6..964e0c2b81 100644
--- a/src/journal/journal-def.h
+++ b/src/journal/journal-def.h
@@ -24,8 +24,9 @@
#include <inttypes.h>
+#include <systemd/sd-id128.h>
+
#include "macro.h"
-#include "sd-id128.h"
typedef struct Header Header;
typedef struct ObjectHeader ObjectHeader;
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
index 51d7119d09..0be3932921 100644
--- a/src/journal/journal-file.h
+++ b/src/journal/journal-file.h
@@ -24,9 +24,10 @@
#include <inttypes.h>
+#include <systemd/sd-id128.h>
+
#include "journal-def.h"
#include "util.h"
-#include "sd-id128.h"
typedef struct Window {
void *ptr;
diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h
index 1b64666da3..e5914bfb63 100644
--- a/src/journal/journal-internal.h
+++ b/src/journal/journal-internal.h
@@ -26,8 +26,9 @@
#include <inttypes.h>
#include <stdbool.h>
+#include <systemd/sd-id128.h>
+
#include "list.h"
-#include "sd-id128.h"
typedef struct Match Match;
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 17d6a7fc23..2e708e959b 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -30,7 +30,8 @@
#include <time.h>
#include <getopt.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
+
#include "log.h"
#include "util.h"
#include "build.h"
diff --git a/src/journal/journald.c b/src/journal/journald.c
index d6206a802f..d7f0ed52b4 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -32,19 +32,20 @@
#include <linux/sockios.h>
#include <sys/statvfs.h>
+#include <systemd/sd-journal.h>
+#include <systemd/sd-login.h>
+#include <systemd/sd-messages.h>
+#include <systemd/sd-daemon.h>
+
#include "hashmap.h"
#include "journal-file.h"
-#include "sd-daemon.h"
#include "socket-util.h"
#include "acl-util.h"
#include "cgroup-util.h"
#include "list.h"
#include "journal-rate-limit.h"
-#include "sd-journal.h"
-#include "sd-login.h"
#include "journal-internal.h"
#include "conf-parser.h"
-#include "sd-messages.h"
#include "journald.h"
#define USER_JOURNALS_MAX 1024
diff --git a/src/journal/sd-journal.h b/src/journal/sd-journal.h
deleted file mode 100644
index 87da17ddc6..0000000000
--- a/src/journal/sd-journal.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#ifndef foojournalhfoo
-#define foojournalhfoo
-
-/***
- This file is part of systemd.
-
- Copyright 2011 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 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
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <stdarg.h>
-#include <sys/uio.h>
-
-#include "sd-id128.h"
-
-/* TODO:
- *
- * - add options for copy-to-console, copy-to-kmsg
- * - OR of matches is borked...
- * - extend hash tables table as we go
- * - accelerate looking for "all hostnames" and suchlike.
- * - handle incomplete header
- *
- * - local deserializer
- * - http server
- * - message catalog
- *
- * - check LE/BE conversion for 8bit, 16bit, 32bit values
- * - cryptographic hash
- * - think about manipulations of header
- * - implement audit gateway
- */
-
-/* Write to daemon */
-
-int sd_journal_print(int piority, const char *format, ...) __attribute__ ((format (printf, 2, 3)));
-int sd_journal_printv(int priority, const char *format, va_list ap);
-
-int sd_journal_send(const char *format, ...) __attribute__((sentinel));
-int sd_journal_sendv(const struct iovec *iov, int n);
-
-int sd_journal_stream_fd(const char *tag, int priority, int priority_prefix);
-
-/* Browse journal stream */
-
-typedef struct sd_journal sd_journal;
-
-enum {
- SD_JOURNAL_LOCAL_ONLY = 1,
- SD_JOURNAL_RUNTIME_ONLY = 2,
- SD_JOURNAL_SYSTEM_ONLY = 4
-};
-
-int sd_journal_open(sd_journal **ret, int flags);
-void sd_journal_close(sd_journal *j);
-
-int sd_journal_previous(sd_journal *j);
-int sd_journal_next(sd_journal *j);
-
-int sd_journal_previous_skip(sd_journal *j, uint64_t skip);
-int sd_journal_next_skip(sd_journal *j, uint64_t skip);
-
-int sd_journal_get_realtime_usec(sd_journal *j, uint64_t *ret);
-int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id128_t *ret_boot_id);
-int sd_journal_get_data(sd_journal *j, const char *field, const void **data, size_t *l);
-int sd_journal_enumerate_data(sd_journal *j, const void **data, size_t *l);
-void sd_journal_restart_data(sd_journal *j);
-
-int sd_journal_add_match(sd_journal *j, const void *data, size_t size);
-void sd_journal_flush_matches(sd_journal *j);
-
-int sd_journal_seek_head(sd_journal *j);
-int sd_journal_seek_tail(sd_journal *j);
-int sd_journal_seek_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint64_t usec);
-int sd_journal_seek_realtime_usec(sd_journal *j, uint64_t usec);
-int sd_journal_seek_cursor(sd_journal *j, const char *cursor);
-
-int sd_journal_get_cursor(sd_journal *j, char **cursor);
-
-int sd_journal_query_unique(sd_journal *j, const char *field); /* missing */
-int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l); /* missing */
-void sd_journal_restart_unique(sd_journal *j); /* missing */
-
-enum {
- SD_JOURNAL_NOP,
- SD_JOURNAL_APPEND,
- SD_JOURNAL_INVALIDATE_ADD,
- SD_JOURNAL_INVALIDATE_REMOVE
-};
-
-int sd_journal_get_fd(sd_journal *j);
-int sd_journal_process(sd_journal *j);
-
-#define SD_JOURNAL_FOREACH(j) \
- if (sd_journal_seek_head(j) >= 0) \
- while (sd_journal_next(j) > 0)
-
-#define SD_JOURNAL_FOREACH_BACKWARDS(j) \
- if (sd_journal_seek_tail(j) >= 0) \
- while (sd_journal_previous(j) > 0)
-
-#define SD_JOURNAL_FOREACH_DATA(j, data, l) \
- for (sd_journal_restart_data(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )
-
-#define SD_JOURNAL_FOREACH_UNIQUE(j, data, l) \
- for (sd_journal_restart_unique(j); sd_journal_enumerate_data((j), &(data), &(l)) > 0; )
-
-#endif
diff --git a/src/journal/test-journal.c b/src/journal/test-journal.c
index 3d429bea90..a023509b70 100644
--- a/src/journal/test-journal.c
+++ b/src/journal/test-journal.c
@@ -22,7 +22,8 @@
#include <fcntl.h>
#include <unistd.h>
-#include "sd-journal.h"
+#include <systemd/sd-journal.h>
+
#include "journal-file.h"
#include "log.h"