parent
b79eccfc57
commit
019bb06085
|
@ -30,7 +30,7 @@ _walk_parents_for_attr(struct udev_device *device, const char *sysattr, const ch
|
||||||
struct udev_device *parent, *child = device;
|
struct udev_device *parent, *child = device;
|
||||||
const char *test;
|
const char *test;
|
||||||
|
|
||||||
while ((parent = udev_device_get_parent(child)))
|
for (parent = udev_device_get_parent(child); parent; child = parent, parent = udev_device_get_parent(child))
|
||||||
{
|
{
|
||||||
if (!(test = udev_device_get_sysattr_value(parent, sysattr)))
|
if (!(test = udev_device_get_sysattr_value(parent, sysattr)))
|
||||||
continue;
|
continue;
|
||||||
|
@ -38,8 +38,6 @@ _walk_parents_for_attr(struct udev_device *device, const char *sysattr, const ch
|
||||||
return 1;
|
return 1;
|
||||||
else if (!strcmp(test, value))
|
else if (!strcmp(test, value))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
child = parent;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue