diff options
author | Kay Sievers <kay@vrfy.org> | 2012-04-16 17:21:22 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-04-16 19:20:57 +0200 |
commit | 6ada823a9a0979ea145fd70add1007c21caa45c0 (patch) | |
tree | 3eff7319e77b9cdffda502cb373a1eae6c6488bb /src/test | |
parent | 8fef0ff25c9fd7e5bb99d66f43c6357e4996a3cc (diff) |
udev: remove configuration options for /dev, /sys, /run directories
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-libudev.c | 10 | ||||
-rw-r--r-- | src/test/test-udev.c | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index 6161fb3e31..f5c7ae2c30 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -434,7 +434,6 @@ int main(int argc, char *argv[]) const char *syspath = "/devices/virtual/mem/null"; const char *subsystem = NULL; char path[1024]; - const char *str; udev = udev_new(); printf("context: %p\n", udev); @@ -474,14 +473,9 @@ int main(int argc, char *argv[]) } } - str = udev_get_sys_path(udev); - printf("sys_path: '%s'\n", str); - str = udev_get_dev_path(udev); - printf("dev_path: '%s'\n", str); - /* add sys path if needed */ - if (strncmp(syspath, udev_get_sys_path(udev), strlen(udev_get_sys_path(udev))) != 0) { - snprintf(path, sizeof(path), "%s%s", udev_get_sys_path(udev), syspath); + if (strncmp(syspath, "/sys", strlen("/sys")) != 0) { + snprintf(path, sizeof(path), "/sys/%s", syspath); syspath = path; } diff --git a/src/test/test-udev.c b/src/test/test-udev.c index 150cb16a31..b843e5f648 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) rules = udev_rules_new(udev, 1); - util_strscpyl(syspath, sizeof(syspath), udev_get_sys_path(udev), devpath, NULL); + util_strscpyl(syspath, sizeof(syspath), TEST_PREFIX "/sys", devpath, NULL); dev = udev_device_new_from_syspath(udev, syspath); if (dev == NULL) { log_debug("unknown device '%s'\n", devpath); |