diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-08-17 21:07:09 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-08-17 21:07:09 +0200 |
commit | 2fdaa983a958822d79821c1afe51e22e7a3e00ff (patch) | |
tree | 2f88d2ba56b59505ee36b75d139d454233f23a1a /udev/udevadm-info.c | |
parent | a20a57a7bfbc6edd7602c135ca78f3e56878badb (diff) |
libudev: udev_device_get_sysattr_value() return syspath of custom links
Diffstat (limited to 'udev/udevadm-info.c')
-rw-r--r-- | udev/udevadm-info.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/udev/udevadm-info.c b/udev/udevadm-info.c index 4053436fe6..f7e7e86b6a 100644 --- a/udev/udevadm-info.c +++ b/udev/udevadm-info.c @@ -52,10 +52,10 @@ static bool skip_attribute(const char *name) static void print_all_attributes(struct udev_device *device, const char *key) { + struct udev *udev = udev_device_get_udev(device); struct udev_list_entry *sysattr; udev_list_entry_foreach(sysattr, udev_device_get_sysattr_list_entry(device)) { - struct udev *udev = udev_device_get_udev(device); const char *name; const char *value; size_t len; @@ -69,6 +69,10 @@ static void print_all_attributes(struct udev_device *device, const char *key) continue; dbg(udev, "attr '%s'='%s'\n", name, value); + /* skip any values that look like a path */ + if (value[0] == '/') + continue; + /* skip nonprintable attributes */ len = strlen(value); while (len > 0 && isprint(value[len-1])) |