diff options
Diffstat (limited to 'src/libsystemd/sd-login/sd-login.c')
-rw-r--r-- | src/libsystemd/sd-login/sd-login.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c index 0eadc8c747..7d6a4b78cf 100644 --- a/src/libsystemd/sd-login/sd-login.c +++ b/src/libsystemd/sd-login/sd-login.c @@ -237,11 +237,13 @@ _public_ int sd_uid_get_display(uid_t uid, char **session) { return r; r = parse_env_file(p, NEWLINE, "DISPLAY", &s, NULL); + if (r == -ENOENT) + return -ENXIO; if (r < 0) return r; if (isempty(s)) - return -ENOENT; + return -ENXIO; *session = s; s = NULL; @@ -465,7 +467,7 @@ static int session_get_string(const char *session, const char *field, char **val return r; if (isempty(s)) - return -ENOENT; + return -ENXIO; *value = s; s = NULL; |