-
- if (strncmp(key, "DEVPATH=", 8) == 0) {
- char path[UTIL_PATH_SIZE];
-
- util_strscpyl(path, sizeof(path), udev_get_sys_path(udev_monitor->udev), &key[8], NULL);
- udev_device_set_syspath(udev_device, path);
- devpath_set = 1;
- } else if (strncmp(key, "SUBSYSTEM=", 10) == 0) {
- udev_device_set_subsystem(udev_device, &key[10]);
- subsystem_set = 1;
- } else if (strncmp(key, "DEVTYPE=", 8) == 0) {
- udev_device_set_devtype(udev_device, &key[8]);
- } else if (strncmp(key, "DEVNAME=", 8) == 0) {
- if (is_kernel)
- udev_device_set_knodename(udev_device, &key[8]);
- else
- udev_device_set_devnode(udev_device, &key[8]);
- } else if (strncmp(key, "DEVLINKS=", 9) == 0) {
- char devlinks[UTIL_PATH_SIZE];
- char *slink;
- char *next;
-
- util_strscpy(devlinks, sizeof(devlinks), &key[9]);
- slink = devlinks;
- next = strchr(slink, ' ');
- while (next != NULL) {
- next[0] = '\0';
- udev_device_add_devlink(udev_device, slink);
- slink = &next[1];
- next = strchr(slink, ' ');
- }
- if (slink[0] != '\0')
- udev_device_add_devlink(udev_device, slink);
- } else if (strncmp(key, "DRIVER=", 7) == 0) {
- udev_device_set_driver(udev_device, &key[7]);
- } else if (strncmp(key, "ACTION=", 7) == 0) {
- udev_device_set_action(udev_device, &key[7]);
- action_set = 1;
- } else if (strncmp(key, "MAJOR=", 6) == 0) {
- maj = strtoull(&key[6], NULL, 10);
- } else if (strncmp(key, "MINOR=", 6) == 0) {
- min = strtoull(&key[6], NULL, 10);
- } else if (strncmp(key, "DEVPATH_OLD=", 12) == 0) {
- udev_device_set_devpath_old(udev_device, &key[12]);
- } else if (strncmp(key, "SEQNUM=", 7) == 0) {
- udev_device_set_seqnum(udev_device, strtoull(&key[7], NULL, 10));
- } else if (strncmp(key, "TIMEOUT=", 8) == 0) {
- udev_device_set_timeout(udev_device, strtoull(&key[8], NULL, 10));
- } else {
- udev_device_add_property_from_string(udev_device, key);
- }