summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-08-24 07:30:24 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-09-11 05:45:21 +0200
commit1b6374d285124f42606d40f36c78695c42264dd1 (patch)
tree48317d2bb6251287ddd97b044385aa670f1f9f6f
parentlibudev-device: use structured initializer (diff)
downloadsystemd-1b6374d285124f42606d40f36c78695c42264dd1.tar.xz
systemd-1b6374d285124f42606d40f36c78695c42264dd1.zip
libudev-device: use original negative errno
-rw-r--r--src/libudev/libudev-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 7de7c52527..6398cd2fab 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -773,7 +773,7 @@ _public_ unsigned long long int udev_device_get_usec_since_initialized(struct ud
r = sd_device_get_usec_since_initialized(udev_device->device, &ts);
if (r < 0) {
- errno = EINVAL;
+ errno = -r;
return 0;
}