[systemd-commits] 4 commits - configure.ac src/journal src/logs-show.c src/manager.c src/special.h src/systemd
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Jan 10 18:56:42 PST 2012
configure.ac | 2 -
src/journal/journal-file.c | 4 +--
src/journal/sd-journal.c | 48 ++++++++++++++++++++++-----------------------
src/logs-show.c | 1
src/manager.c | 38 ++++++++++-------------------------
src/special.h | 2 -
src/systemd/sd-journal.h | 9 ++------
7 files changed, 43 insertions(+), 61 deletions(-)
New commits:
commit f1a42db5a39b82eb602f440c4b50684ef72be47c
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 11 03:56:35 2012 +0100
build-sys: bump version
diff --git a/configure.ac b/configure.ac
index a223b80..80d0156 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
AC_PREREQ(2.63)
-AC_INIT([systemd],[37],[systemd-devel at lists.freedesktop.org])
+AC_INIT([systemd],[38],[systemd-devel at lists.freedesktop.org])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
commit 1921a5cb3d3124d62ac397592d9f1f302ca90be5
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 11 03:55:24 2012 +0100
journal: don't realign window twice
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 7ce6337..419e15e 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -330,7 +330,7 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_
* the window space before and half behind the
* requested mapping */
- delta = PAGE_ALIGN((DEFAULT_WINDOW_SIZE - size) / 2);
+ delta = (DEFAULT_WINDOW_SIZE - size) / 2;
if (delta > offset)
delta = offset;
@@ -341,7 +341,7 @@ static int journal_file_move_to(JournalFile *f, int wt, uint64_t offset, uint64_
delta = 0;
if (offset + size > (uint64_t) f->last_stat.st_size)
- size = PAGE_ALIGN((uint64_t) f->last_stat.st_size - offset);
+ size = (uint64_t) f->last_stat.st_size - offset;
if (size <= 0)
return -EADDRNOTAVAIL;
commit 19a2bd80c18d2845f0e37699c8d8df8c8cb4ed78
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 11 03:23:04 2012 +0100
sd-journal: implement a number of non-implemented calls from the API for now
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index fe9208c..5e1fd47 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1590,27 +1590,27 @@ _public_ int sd_journal_process(sd_journal *j) {
}
}
-_public_ int sd_journal_query_unique(sd_journal *j, const char *field) {
- if (!j)
- return -EINVAL;
- if (!field)
- return -EINVAL;
-
- return -ENOTSUP;
-}
-
-_public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l) {
- if (!j)
- return -EINVAL;
- if (!data)
- return -EINVAL;
- if (!l)
- return -EINVAL;
-
- return -ENOTSUP;
-}
-
-_public_ void sd_journal_restart_unique(sd_journal *j) {
- if (!j)
- return;
-}
+/* _public_ int sd_journal_query_unique(sd_journal *j, const char *field) { */
+/* if (!j) */
+/* return -EINVAL; */
+/* if (!field) */
+/* return -EINVAL; */
+
+/* return -ENOTSUP; */
+/* } */
+
+/* _public_ int sd_journal_enumerate_unique(sd_journal *j, const void **data, size_t *l) { */
+/* if (!j) */
+/* return -EINVAL; */
+/* if (!data) */
+/* return -EINVAL; */
+/* if (!l) */
+/* return -EINVAL; */
+
+/* return -ENOTSUP; */
+/* } */
+
+/* _public_ void sd_journal_restart_unique(sd_journal *j) { */
+/* if (!j) */
+/* return; */
+/* } */
diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h
index ebc63b7..c635df3 100644
--- a/src/systemd/sd-journal.h
+++ b/src/systemd/sd-journal.h
@@ -46,7 +46,6 @@
* - cryptographic hash
* - think about manipulations of header
* - implement audit gateway
- * - implement kernel gatway
*/
/* Write to daemon */
@@ -95,9 +94,9 @@ 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 */
+/* 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,
commit 731a676c206bb1b48e7f736ce9f5b730252d1601
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Jan 11 03:16:24 2012 +0100
systemd: reconnect to syslog as soon as the journal is fully up
diff --git a/src/logs-show.c b/src/logs-show.c
index cb18da2..2fe205f 100644
--- a/src/logs-show.c
+++ b/src/logs-show.c
@@ -178,6 +178,7 @@ static int output_short(sd_journal *j, unsigned line, bool show_all, bool monoto
uint64_t x;
time_t t;
struct tm tm;
+
r = -ENOENT;
if (realtime)
diff --git a/src/manager.c b/src/manager.c
index dbcd630..54df7eb 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -3129,36 +3129,20 @@ void manager_recheck_syslog(Manager *m) {
if (m->running_as != MANAGER_SYSTEM)
return;
- if ((u = manager_get_unit(m, SPECIAL_SYSLOG_SOCKET))) {
- SocketState state;
-
- state = SOCKET(u)->state;
-
- if (state != SOCKET_DEAD &&
- state != SOCKET_FAILED &&
- state != SOCKET_RUNNING) {
-
- /* Hmm, the socket is not set up, or is still
- * listening, let's better not try to use
- * it. Note that we have no problem if the
- * socket is completely down, since there
- * might be a foreign /dev/log socket around
- * and we want to make use of that.
- */
-
- log_close_syslog();
- return;
- }
+ u = manager_get_unit(m, SPECIAL_JOURNALD_SOCKET);
+ if (u && SOCKET(u)->state != SOCKET_RUNNING) {
+ log_close_syslog();
+ return;
}
- if ((u = manager_get_unit(m, SPECIAL_SYSLOG_TARGET)))
- if (TARGET(u)->state != TARGET_ACTIVE) {
- log_close_syslog();
- return;
- }
+ u = manager_get_unit(m, SPECIAL_JOURNALD_SERVICE);
+ if (u && SERVICE(u)->state != SERVICE_RUNNING) {
+ log_close_syslog();
+ return;
+ }
- /* Hmm, OK, so the socket is either fully up, or fully down,
- * and the target is up, then let's make use of the socket */
+ /* Hmm, OK, so the socket is fully up and the service is up
+ * too, then let's make use of the thing. */
log_open();
}
diff --git a/src/special.h b/src/special.h
index b90161c..8185eaf 100644
--- a/src/special.h
+++ b/src/special.h
@@ -71,7 +71,7 @@
#define SPECIAL_DBUS_SERVICE "dbus.service"
#define SPECIAL_DBUS_SOCKET "dbus.socket"
#define SPECIAL_JOURNALD_SOCKET "systemd-journald.socket"
-#define SPECIAL_SYSLOG_SOCKET "syslog.socket"
+#define SPECIAL_JOURNALD_SERVICE "systemd-journald.service"
/* Magic init signals */
#define SPECIAL_KBREQUEST_TARGET "kbrequest.target"
diff --git a/src/systemd/sd-journal.h b/src/systemd/sd-journal.h
index d0cb950..ebc63b7 100644
--- a/src/systemd/sd-journal.h
+++ b/src/systemd/sd-journal.h
@@ -37,8 +37,6 @@
* - handle incomplete header
*
* - kann NTP nicht finden?
- * - in unit.c check ob syslog.socket wegen logging reconnect is kaputt
- *
*
* - local deserializer
* - http server
More information about the systemd-commits
mailing list