diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-09-08 14:03:22 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-09-08 14:03:22 +0200 |
commit | 4211d5bd135ae4c43bd2012ae5f327b1cc1596c0 (patch) | |
tree | 7ffa23033f081abcec0f9d9d2774cb7f885e9de4 /src/udev/udev-builtin-uaccess.c | |
parent | 23d08d1b2bfd7f4b3c0a9408c9ccd65c3fb80fc2 (diff) |
sd-login: fix sd_seat_get_active() to return ENODATAsystemd/v226
This seems to be an oversight from:
707b66c66381c899d7ef640e158ffdd5bcff4deb
We have to return ENODATA instead of ENOENT if a requested entry is
non-present. Also fix the call-site in udev to check for these errors.
Diffstat (limited to 'src/udev/udev-builtin-uaccess.c')
-rw-r--r-- | src/udev/udev-builtin-uaccess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-uaccess.c b/src/udev/udev-builtin-uaccess.c index 43bab8af63..7bf4e7f24d 100644 --- a/src/udev/udev-builtin-uaccess.c +++ b/src/udev/udev-builtin-uaccess.c @@ -45,7 +45,7 @@ static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool seat = "seat0"; r = sd_seat_get_active(seat, NULL, &uid); - if (r == -ENOENT) { + if (r == -ENXIO || r == -ENODATA) { /* No active session on this seat */ r = 0; goto finish; |