1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00

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; r = -errno;
goto finish; goto finish;
} else if (k == 0) { } else if (k == 0) {
r = -ETIMEDOUT; r = -ETIME;
goto finish; goto finish;
} }

View File

@ -1361,6 +1361,7 @@ static const char *error_to_dbus(int error) {
return DBUS_ERROR_FILE_EXISTS; return DBUS_ERROR_FILE_EXISTS;
case -ETIMEDOUT: case -ETIMEDOUT:
case -ETIME:
return DBUS_ERROR_TIMEOUT; return DBUS_ERROR_TIMEOUT;
case -EIO: case -EIO:

View File

@ -128,7 +128,7 @@ static int ask_password_plymouth(
y = now(CLOCK_MONOTONIC); y = now(CLOCK_MONOTONIC);
if (y > until) { if (y > until) {
r = -ETIMEDOUT; r = -ETIME;
goto finish; goto finish;
} }
@ -149,7 +149,7 @@ static int ask_password_plymouth(
r = -errno; r = -errno;
goto finish; goto finish;
} else if (j == 0) { } else if (j == 0) {
r = -ETIMEDOUT; r = -ETIME;
goto finish; goto finish;
} }