Check property match earlier, to avoid lots of readlink() and stat()
calls when we check property matches.
continue;
util_strscpyl(syspath, sizeof(syspath), path, "/", dent->d_name, NULL);
+ if (!match_property(udev_enumerate, syspath))
+ continue;
if (lstat(syspath, &statbuf) != 0)
continue;
if (S_ISREG(statbuf.st_mode))
continue;
if (!match_sysattr(udev_enumerate, syspath))
continue;
- if (!match_property(udev_enumerate, syspath))
- continue;
syspath_add(udev_enumerate, syspath);
}
closedir(dir);