return true;
if (udev_device_get_tags_list_entry(udev_device) != NULL)
return true;
+ if (udev_device_get_knodename(udev_device) != NULL)
+ if (strcmp(udev_device_get_devnode(udev_device), udev_device_get_knodename(udev_device)) != 0)
+ return true;
if (udev_device_get_watch_handle(udev_device) >= 0)
return true;
return false;
char filename[UTIL_PATH_SIZE];
char filename_tmp[UTIL_PATH_SIZE];
FILE *f;
- size_t devlen = strlen(udev_get_dev_path(udev))+1;
id = udev_device_get_id_filename(udev_device);
if (id == NULL)
util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/db/", id, NULL);
/* do not store anything for otherwise empty devices */
- if (!has_info && udev_device_get_devnode(udev_device) == NULL) {
+ if (!has_info &&
+ major(udev_device_get_devnum(udev_device)) == 0 &&
+ udev_device_get_ifindex(udev_device) == 0) {
unlink(filename);
return 0;
}
}
if (has_info) {
+ size_t devlen = strlen(udev_get_dev_path(udev))+1;
struct udev_list_entry *list_entry;
if (udev_device_get_devnode(udev_device) != NULL) {