chiark / gitweb /
journalctl: show systemd messages about unit for -u
[elogind.git] / src / journal / journald-stream.c
index 3e4022ad6942cb4e086ed70c4d49ec24ffa20948..bdc2f49ef4eae71ca461add529af82b1bde7892f 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
+#include <stddef.h>
 #include <sys/epoll.h>
 
 #ifdef HAVE_SELINUX
@@ -28,7 +29,7 @@
 #endif
 
 #include "socket-util.h"
-#include "journald.h"
+#include "journald-server.h"
 #include "journald-stream.h"
 #include "journald-syslog.h"
 #include "journald-kmsg.h"
@@ -174,7 +175,7 @@ static int stdout_stream_line(StdoutStream *s, char *p) {
 
         case STDOUT_STREAM_PRIORITY:
                 r = safe_atoi(p, &s->priority);
-                if (r < 0 || s->priority <= 0 || s->priority >= 999) {
+                if (r < 0 || s->priority < 0 || s->priority > 999) {
                         log_warning("Failed to parse log priority line.");
                         return -EINVAL;
                 }