chiark / gitweb /
sd-bus: rename "connection name" to "description" for the sd-bus API too
[elogind.git] / src / journal / journald-kmsg.c
index 9935986c121ac242fc1aaa6faaa92160fa1bbe83..126126b8878b488849d4ce5223b8a7f15d186c81 100644 (file)
@@ -37,7 +37,7 @@ void server_forward_kmsg(
         int priority,
         const char *identifier,
         const char *message,
-        struct ucred *ucred) {
+        const struct ucred *ucred) {
 
         struct iovec iovec[5];
         char header_priority[6], header_pid[16];
@@ -104,7 +104,7 @@ static bool is_us(const char *pid) {
         return t == getpid();
 }
 
-static void dev_kmsg_record(Server *s, char *p, size_t l) {
+static void dev_kmsg_record(Server *s, const char *p, size_t l) {
         struct iovec iovec[N_IOVEC_META_FIELDS + 7 + N_IOVEC_KERNEL_FIELDS + 2 + N_IOVEC_UDEV_FIELDS];
         char *message = NULL, *syslog_priority = NULL, *syslog_pid = NULL, *syslog_facility = NULL, *syslog_identifier = NULL, *source_time = NULL;
         int priority, r;
@@ -152,7 +152,7 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
                 /* Did we lose any? */
                 if (serial > *s->kernel_seqnum)
                         server_driver_message(s, SD_MESSAGE_JOURNAL_MISSED, "Missed %"PRIu64" kernel messages",
-                                              serial - *s->kernel_seqnum - 1);
+                                              serial - *s->kernel_seqnum);
 
                 /* Make sure we never read this one again. Note that
                  * we always store the next message serial we expect