general: unify error code we generate on timeout

This commit is contained in:
Lennart Poettering 2011-02-24 02:33:57 +01:00
parent aa2e211587
commit ccc80078fe
3 changed files with 4 additions and 3 deletions

View File

@ -132,7 +132,7 @@ int ask_password_tty(
r = -errno;
goto finish;
} else if (k == 0) {
r = -ETIMEDOUT;
r = -ETIME;
goto finish;
}

View 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:

View 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;
}