mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
udevadm info: "-a" should enumerate sysfs attributes, not envs (#11642)
This fixes a bug introduced by 13aca84769
.
This commit is contained in:
parent
95832a0f8c
commit
6d6308f677
@ -61,12 +61,15 @@ static bool skip_attribute(const char *name) {
|
||||
static void print_all_attributes(sd_device *device, const char *key) {
|
||||
const char *name, *value;
|
||||
|
||||
FOREACH_DEVICE_PROPERTY(device, name, value) {
|
||||
FOREACH_DEVICE_SYSATTR(device, name) {
|
||||
size_t len;
|
||||
|
||||
if (skip_attribute(name))
|
||||
continue;
|
||||
|
||||
if (sd_device_get_sysattr_value(device, name, &value) < 0)
|
||||
continue;
|
||||
|
||||
/* skip any values that look like a path */
|
||||
if (value[0] == '/')
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user