chiark / gitweb /
random-seed: fix error message typo
[elogind.git] / src / tty-ask-password-agent / tty-ask-password-agent.c
index 2e74a25972ddce27e7c4c6307e83533f414100e5..052c10e7d5f50c7e9d65c58a6ef37189b03f0726 100644 (file)
@@ -315,8 +315,7 @@ static int parse_password(const char *filename, char **wall) {
                              *wall ? "\r\n\r\n" : "",
                              message,
                              pid) < 0) {
-                        log_error("Out of memory");
-                        r = -ENOMEM;
+                        r = log_oom();
                         goto finish;
                 }
 
@@ -533,8 +532,7 @@ static int show_passwords(void) {
                         continue;
 
                 if (!(p = strappend("/run/systemd/ask-password/", de->d_name))) {
-                        log_error("Out of memory");
-                        r = -ENOMEM;
+                        r = log_oom();
                         goto finish;
                 }
 
@@ -738,6 +736,7 @@ static int parse_argv(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
         int r;
 
+        log_set_target(LOG_TARGET_AUTO);
         log_parse_environment();
         log_open();