summaryrefslogtreecommitdiff
path: root/src/udev/accelerometer
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/accelerometer')
-rw-r--r--src/udev/accelerometer/accelerometer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
index 4c5e47d0b7..08be363370 100644
--- a/src/udev/accelerometer/accelerometer.c
+++ b/src/udev/accelerometer/accelerometer.c
@@ -294,7 +294,7 @@ int main (int argc, char** argv)
}
/* get the device */
- snprintf(devpath, sizeof(devpath), "%s/%s", udev_get_sys_path(udev), argv[optind]);
+ snprintf(devpath, sizeof(devpath), "/sys/%s", argv[optind]);
dev = udev_device_new_from_syspath(udev, devpath);
if (dev == NULL) {
fprintf(stderr, "unable to access '%s'\n", devpath);
@@ -307,9 +307,8 @@ int main (int argc, char** argv)
return 0;
}
- /* Get the children devices and find the devnode
- * FIXME: use udev_enumerate_add_match_children() instead
- * when it's available */
+ /* Get the children devices and find the devnode */
+ /* FIXME: use udev_enumerate_add_match_parent() instead */
devnode = NULL;
enumerate = udev_enumerate_new(udev);
udev_enumerate_add_match_property(enumerate, "ID_PATH", id_path);