chiark / gitweb /
log_error() if inotify_add_watch() fails
[elogind.git] / src / shared / ask-password-api.c
index 4333bfb564ae8b0b034f7a4b81a75d8a9a244516..10e6ae0614809ca9a6df9667b4944ce89f6be1c0 100644 (file)
@@ -78,6 +78,7 @@ int ask_password_tty(
                 }
 
                 if (inotify_add_watch(notify, flag_file, IN_ATTRIB /* for the link count */) < 0) {
+                        log_error("Failed to add watch on %s: %m", flag_file);
                         r = -errno;
                         goto finish;
                 }
@@ -281,8 +282,7 @@ static int create_socket(char **name) {
         }
 
         if (!(c = strdup(sa.un.sun_path))) {
-                r = -ENOMEM;
-                log_error("Out of memory");
+                r = log_oom();
                 goto fail;
         }