Lines Matching defs:subsystem

50  * filesystem. Devices usually belong to a kernel subsystem, and have
51 * a unique name inside that subsystem.
70 char *subsystem;
264 static int udev_device_set_subsystem(struct udev_device *udev_device, const char *subsystem)
266 free(udev_device->subsystem);
267 udev_device->subsystem = strdup(subsystem);
268 if (udev_device->subsystem == NULL)
271 udev_device_add_property_internal(udev_device, "SUBSYSTEM", udev_device->subsystem);
279 * Retrieve the subsystem string of the udev device. The string does not
282 * Returns: the subsystem name of the udev device, or #NULL if it can not be determined
286 char subsystem[UTIL_NAME_SIZE];
292 /* read "subsystem" link */
293 if (util_get_sys_core_link_value(udev_device->udev, "subsystem", udev_device->syspath, subsystem, sizeof(subsystem)) > 0) {
294 udev_device_set_subsystem(udev_device, subsystem);
295 return udev_device->subsystem;
300 return udev_device->subsystem;
304 return udev_device->subsystem;
306 if (startswith(udev_device->devpath, "/subsystem/") ||
309 udev_device_set_subsystem(udev_device, "subsystem");
310 return udev_device->subsystem;
313 return udev_device->subsystem;
569 if (udev_device->devpath == NULL || udev_device->subsystem == NULL)
871 * +sound:card29 - kernel driver core subsystem:device name
944 * @subsystem: the subsystem of the device
948 * and the udev database entry. The device is looked up by the subsystem
956 _public_ struct udev_device *udev_device_new_from_subsystem_sysname(struct udev *udev, const char *subsystem, const char *sysname)
961 if (streq(subsystem, "subsystem")) {
962 strscpyl(path, sizeof(path), "/sys/subsystem/", sysname, NULL);
976 if (streq(subsystem, "module")) {
983 if (streq(subsystem, "drivers")) {
993 strscpyl(path, sizeof(path), "/sys/subsystem/", subsys, "/drivers/", driver, NULL);
1006 strscpyl(path, sizeof(path), "/sys/subsystem/", subsystem, "/devices/", sysname, NULL);
1010 strscpyl(path, sizeof(path), "/sys/bus/", subsystem, "/devices/", sysname, NULL);
1014 strscpyl(path, sizeof(path), "/sys/class/", subsystem, "/", sysname, NULL);
1117 * @subsystem: the subsystem of the device
1120 * Find the next parent device, with a matching subsystem and devtype
1124 * If devtype is #NULL, only subsystem is checked, and any devtype will
1135 _public_ struct udev_device *udev_device_get_parent_with_subsystem_devtype(struct udev_device *udev_device, const char *subsystem, const char *devtype)
1139 if (subsystem == NULL) {
1150 if (parent_subsystem != NULL && streq(parent_subsystem, subsystem)) {
1218 free(udev_device->subsystem);
1495 streq(sysattr, "subsystem") ||