summaryrefslogtreecommitdiff
path: root/src/udev/udev-node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-node.c')
-rw-r--r--src/udev/udev-node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index 9add76547f..738d02fa25 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -190,8 +190,8 @@ static void link_update(struct udev_device *dev, const char *slink, bool add)
const char *target;
char buf[UTIL_PATH_SIZE];
- util_path_encode(slink + strlen(TEST_PREFIX "/dev"), name_enc, sizeof(name_enc));
- util_strscpyl(dirname, sizeof(dirname), TEST_PREFIX "/run/udev/links/", name_enc, NULL);
+ util_path_encode(slink + strlen("/dev"), name_enc, sizeof(name_enc));
+ util_strscpyl(dirname, sizeof(dirname), "/run/udev/links/", name_enc, NULL);
util_strscpyl(filename, sizeof(filename), dirname, "/", udev_device_get_id_filename(dev), NULL);
if (!add && unlink(filename) == 0)
@@ -315,7 +315,7 @@ void udev_node_add(struct udev_device *dev, mode_t mode, uid_t uid, gid_t gid)
return;
/* always add /dev/{block,char}/$major:$minor */
- snprintf(filename, sizeof(filename), TEST_PREFIX "/dev/%s/%u:%u",
+ snprintf(filename, sizeof(filename), "/dev/%s/%u:%u",
strcmp(udev_device_get_subsystem(dev), "block") == 0 ? "block" : "char",
major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)));
node_symlink(udev, udev_device_get_devnode(dev), filename);
@@ -340,7 +340,7 @@ void udev_node_remove(struct udev_device *dev)
link_update(dev, udev_list_entry_get_name(list_entry), 0);
/* remove /dev/{block,char}/$major:$minor */
- snprintf(filename, sizeof(filename), TEST_PREFIX "/dev/%s/%u:%u",
+ snprintf(filename, sizeof(filename), "/dev/%s/%u:%u",
strcmp(udev_device_get_subsystem(dev), "block") == 0 ? "block" : "char",
major(udev_device_get_devnum(dev)), minor(udev_device_get_devnum(dev)));
unlink(filename);