]> err.no Git - systemd/commitdiff
general: unify error code we generate on timeout
authorLennart Poettering <lennart@poettering.net>
Thu, 24 Feb 2011 01:33:57 +0000 (02:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 24 Feb 2011 01:33:57 +0000 (02:33 +0100)
src/ask-password-api.c
src/dbus.c
src/tty-ask-password-agent.c

index 845517a6905d12004bf120ce85657f2bad60822b..f43075e60194e5a563d345f217109198479fb97c 100644 (file)
@@ -132,7 +132,7 @@ int ask_password_tty(
                         r = -errno;
                         goto finish;
                 } else if (k == 0) {
-                        r = -ETIMEDOUT;
+                        r = -ETIME;
                         goto finish;
                 }
 
index d7b80ba01d17c9bbe8d31ad368b179784c349f11..64988c7ccc5831e52e12b4364c7119db81520fe1 100644 (file)
@@ -1361,6 +1361,7 @@ static const char *error_to_dbus(int error) {
                 return DBUS_ERROR_FILE_EXISTS;
 
         case -ETIMEDOUT:
+        case -ETIME:
                 return DBUS_ERROR_TIMEOUT;
 
         case -EIO:
index 14b01486bd4636a942347df45c7df77880f5838e..5e745247e5d01c715605b6101f4bd6aa8e5e9617 100644 (file)
@@ -128,7 +128,7 @@ static int ask_password_plymouth(
                         y = now(CLOCK_MONOTONIC);
 
                         if (y > until) {
-                                r = -ETIMEDOUT;
+                                r = -ETIME;
                                 goto finish;
                         }
 
@@ -149,7 +149,7 @@ static int ask_password_plymouth(
                         r = -errno;
                         goto finish;
                 } else if (j == 0) {
-                        r = -ETIMEDOUT;
+                        r = -ETIME;
                         goto finish;
                 }