1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

[PATCH] skip waiting for device if we get a bad event for class creation

This commit is contained in:
kay.sievers@vrfy.org 2004-10-23 12:15:22 +02:00 committed by Greg KH
parent 21d2888a0a
commit ab51035617

View File

@ -99,6 +99,12 @@ int main(int argc, char *argv[], char *envp[])
snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_mnt_path, devpath);
filename[SYSFS_PATH_MAX-1] = '\0';
/* skip bad events where we get no device for the class */
if (strncmp(devpath, "/class/", 7) == 0 && strchr(&devpath[7], '/') == NULL) {
dbg("no device name for '%s', bad event", devpath);
goto exit;
}
/* open the class device we are called for */
class_dev = open_class_device_wait(filename);
if (!class_dev) {