chiark / gitweb /
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 845517a..f43075e 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 d7b80ba..64988c7 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 14b0148..5e74524 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;
                 }