- /* remove /dev if given */
- if (strncmp(optarg, udev_get_dev_path(udev), strlen(udev_get_dev_path(udev))) != 0)
- util_strscpyl(name, sizeof(name), udev_get_dev_path(udev), "/", optarg, NULL);
+ /* add /dev if not given */
+ if (!startswith(optarg, "/dev"))
+ util_strscpyl(name, sizeof(name), "/dev/", optarg, NULL);