]> git.proxmox.com Git - systemd.git/commitdiff
manager: Pass correct errno to strerror()
authorMichael Biebl <biebl@debian.org>
Thu, 16 Apr 2015 13:14:06 +0000 (15:14 +0200)
committerMichael Biebl <biebl@debian.org>
Fri, 17 Apr 2015 13:42:00 +0000 (15:42 +0200)
have_ask_password contains negative error values which have to be
negated when being passed to strerror().

debian/changelog
debian/patches/manager-pass-correct-errno-to-strerror.patch [new file with mode: 0644]
debian/patches/series

index 14c9437abb8e7360eb14847aa75a92d1a3de9ee1..0f82dafd95b48d273fb5eb8ec9337e9a95a1717a 100644 (file)
@@ -1,3 +1,11 @@
+systemd (215-18) UNRELEASED; urgency=medium
+
+  * manager: Pass correct errno to strerror(), have_ask_password contains
+    negative error values which have to be negated when being passed to
+    strerror().
+
+ -- Michael Biebl <biebl@debian.org>  Fri, 17 Apr 2015 15:40:29 +0200
+
 systemd (215-17) unstable; urgency=high
 
   * cryptsetup: Implement offset and skip options. (Closes: #751707,
diff --git a/debian/patches/manager-pass-correct-errno-to-strerror.patch b/debian/patches/manager-pass-correct-errno-to-strerror.patch
new file mode 100644 (file)
index 0000000..76b56fc
--- /dev/null
@@ -0,0 +1,27 @@
+From 6d025bafdb9a3317fac014bdf19acf09256a1531 Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl@debian.org>
+Date: Thu, 16 Apr 2015 13:56:28 +0200
+Subject: [PATCH] manager: pass correct errno to strerror()
+
+have_ask_password contains negative error values which have to be
+negated when being passed to strerror().
+---
+ src/core/manager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/manager.c b/src/core/manager.c
+index 47e23ba..06ef376 100644
+--- a/src/core/manager.c
++++ b/src/core/manager.c
+@@ -241,7 +241,7 @@ static int manager_dispatch_ask_password_fd(sd_event_source *source,
+         if (m->have_ask_password < 0)
+                 /* Log error but continue. Negative have_ask_password
+                  * is treated as unknown status. */
+-                log_error("Failed to list /run/systemd/ask-password: %s", strerror(m->have_ask_password));
++                log_error("Failed to list /run/systemd/ask-password: %s", strerror(-m->have_ask_password));
+         return 0;
+ }
+-- 
+2.1.4
+
index f708c0ccd499a0e0a2154f61356652ee98f25eeb..981551b3b0024deb4a63e721dcfcf66db8f6681c 100644 (file)
@@ -149,6 +149,7 @@ timesyncd-enable-timesyncd-in-virtual-machines.patch
 logind-handle-runtime-dir-without-CAP_SYS_ADMIN.patch
 sd-bus-create-clean-error-when-a-property-Set-call-w.patch
 manager-do-not-print-anything-while-passwords-are-be.patch
+manager-pass-correct-errno-to-strerror.patch
 
 ## Debian specific patches:
 Add-back-support-for-Debian-specific-config-files.patch