sd-device: fix error code returned by sd_device_get_sysattr_value() for non-existing...
authorLennart Poettering <lennart@poettering.net>
Fri, 9 Apr 2021 13:00:16 +0000 (15:00 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 9 Apr 2021 18:41:43 +0000 (19:41 +0100)
commite2e40e9a9e4074eaca7984b70a5d1cd7a7f0cbe0
treecb5196a3af7b5748eb5f7195413f5f39224e40ea
parent5b1375035b617bbee8b22a997be527d1b7a392f8
sd-device: fix error code returned by sd_device_get_sysattr_value() for non-existing attributes

lstat() returns the error in errno, not as return value. Let's propagate
this correctly.

This broke the bolt test suite, as @gicmo discovered.

Follow-up for acfc2a1d15560084e077ffb3be472cd117e9020a.
src/libsystemd/sd-device/sd-device.c