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/libudev/libudev-device-private.c | |
parent | 8fef0ff25c9fd7e5bb99d66f43c6357e4996a3cc (diff) |
udev: remove configuration options for /dev, /sys, /run directories
Diffstat (limited to 'src/libudev/libudev-device-private.c')
-rw-r--r-- | src/libudev/libudev-device-private.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index 91fd06c025..c58cde2ff6 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -31,7 +31,7 @@ static void udev_device_tag(struct udev_device *dev, const char *tag, bool add) id = udev_device_get_id_filename(dev); if (id == NULL) return; - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/tags/", tag, "/", id, NULL); + util_strscpyl(filename, sizeof(filename), TEST_PREFIX "/run/udev/tags/", tag, "/", id, NULL); if (add) { int fd; @@ -108,7 +108,7 @@ int udev_device_update_db(struct udev_device *udev_device) return -1; has_info = device_has_info(udev_device); - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/data/", id, NULL); + util_strscpyl(filename, sizeof(filename), TEST_PREFIX "/run/udev/data/", id, NULL); /* do not store anything for otherwise empty devices */ if (!has_info && @@ -138,10 +138,8 @@ int udev_device_update_db(struct udev_device *udev_device) struct udev_list_entry *list_entry; if (major(udev_device_get_devnum(udev_device)) > 0) { - size_t devlen = strlen(udev_get_dev_path(udev))+1; - udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(udev_device)) - fprintf(f, "S:%s\n", &udev_list_entry_get_name(list_entry)[devlen]); + fprintf(f, "S:%s\n", udev_list_entry_get_name(list_entry) + strlen(TEST_PREFIX "/dev/")); if (udev_device_get_devlink_priority(udev_device) != 0) fprintf(f, "L:%i\n", udev_device_get_devlink_priority(udev_device)); if (udev_device_get_watch_handle(udev_device) >= 0) @@ -173,13 +171,12 @@ int udev_device_update_db(struct udev_device *udev_device) int udev_device_delete_db(struct udev_device *udev_device) { const char *id; - struct udev *udev = udev_device_get_udev(udev_device); char filename[UTIL_PATH_SIZE]; id = udev_device_get_id_filename(udev_device); if (id == NULL) return -1; - util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/data/", id, NULL); + util_strscpyl(filename, sizeof(filename), TEST_PREFIX "/run/udev/data/", id, NULL); unlink(filename); return 0; } |