Condition *match_host,
Condition *match_virt,
Condition *match_kernel,
+ Condition *match_arch,
const char *dev_mac,
const char *dev_path,
+ const char *dev_parent_driver,
const char *dev_driver,
const char *dev_type,
const char *dev_name) {
if (match_kernel && !condition_test_kernel_command_line(match_kernel))
return 0;
+ if (match_arch && !condition_test_architecture(match_arch))
+ return 0;
+
if (match_mac && (!dev_mac || memcmp(match_mac, ether_aton(dev_mac), ETH_ALEN)))
return 0;
if (match_path && (!dev_path || fnmatch(match_path, dev_path, 0)))
return 0;
- if (match_driver && !streq_ptr(match_driver, dev_driver))
- return 0;
+ if (match_driver) {
+ if (dev_parent_driver && !streq(match_driver, dev_parent_driver))
+ return 0;
+ else if (!streq_ptr(match_driver, dev_driver))
+ return 0;
+ }
if (match_type && !streq_ptr(match_type, dev_type))
return 0;
- if (match_name && (!dev_path || fnmatch(match_name, dev_name, 0)))
+ if (match_name && (!dev_name || fnmatch(match_name, dev_name, 0)))
return 0;
return 1;