projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95832a0
)
udevadm info: "-a" should enumerate sysfs attributes, not envs (#11642)
author
Mantas Mikulėnas
<grawity@gmail.com>
Tue, 5 Feb 2019 04:30:49 +0000
(06:30 +0200)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 5 Feb 2019 04:30:49 +0000
(06:30 +0200)
This fixes a bug introduced by
13aca847695f49afeb93367ecdad76035fa6c139
.
src/udev/udevadm-info.c
patch
|
blob
|
history
diff --git
a/src/udev/udevadm-info.c
b/src/udev/udevadm-info.c
index
135a5e0
..
ebd15d3
100644
(file)
--- a/
src/udev/udevadm-info.c
+++ b/
src/udev/udevadm-info.c
@@
-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, valu
e) {
+ FOREACH_DEVICE_
SYSATTR(device, nam
e) {
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;