chiark / gitweb /
journald: be more careful when we try to flush the runtime journal to disk and the...
[elogind.git] / src / journal / cat.c
index cdd46bcf5b7b41e3733faa2a17a83fc648ae3b6c..ea615783531eeb9a34dcf558020ed7885780328f 100644 (file)
@@ -25,7 +25,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <errno.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 
 #include <systemd/sd-journal.h>
 
@@ -81,7 +81,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
@@ -91,10 +90,8 @@ static int parse_argv(int argc, char *argv[]) {
                                 arg_identifier = NULL;
                         else {
                                 arg_identifier = strdup(optarg);
-                                if (!arg_identifier) {
-                                        log_error("Out of memory.");
-                                        return -ENOMEM;
-                                }
+                                if (!arg_identifier)
+                                        return log_oom();
                         }
                         break;