+ if (devpath)
+ strfieldcpy(udev->devpath, devpath);
+ if (subsystem)
+ strfieldcpy(udev->subsystem, subsystem);
+ if (action)
+ strfieldcpy(udev->action, action);
+
+ if (strcmp(udev->subsystem, "block") == 0)
+ udev->type = 'b';
+ else if (strcmp(udev->subsystem, "net") == 0)
+ udev->type = 'n';
+ else if (strncmp(udev->devpath, "/block/", 7) == 0)
+ udev->type = 'b';
+ else if (strncmp(udev->devpath, "/class/net/", 11) == 0)
+ udev->type = 'n';
+ else if (strncmp(udev->devpath, "/class/", 7) == 0)
+ udev->type = 'c';