Lines Matching refs:subsystem

345  * @subsystem: filter for a subsystem of the device to include in the list
347 * Match only devices belonging to a certain kernel subsystem.
351 _public_ int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
355 if (subsystem == NULL)
357 if (udev_list_entry_add(&udev_enumerate->subsystem_match_list, subsystem, NULL) == NULL)
365 * @subsystem: filter for a subsystem of the device to exclude from the list
367 * Match only devices not belonging to a certain kernel subsystem.
371 _public_ int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
375 if (subsystem == NULL)
377 if (udev_list_entry_add(&udev_enumerate->subsystem_nomatch_list, subsystem, NULL) == NULL)
721 static bool match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem)
725 if (!subsystem)
729 if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0)
735 if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0)
744 static int scan_dir(struct udev_enumerate *udev_enumerate, const char *basedir, const char *subdir, const char *subsystem)
757 if (!match_subsystem(udev_enumerate, subsystem != NULL ? subsystem : dent->d_name))
902 if (stat("/sys/subsystem", &statbuf) == 0) {
903 /* we have /subsystem/, forget all the old stuff */
904 scan_dir(udev_enumerate, "subsystem", "devices", NULL);
958 if (stat("/sys/subsystem", &statbuf) == 0)
959 subsysdir = "subsystem";
964 if (match_subsystem(udev_enumerate, "subsystem"))
967 /* all subsystem drivers */