[PATCH 05/35] monitor: add uevent filters

mwilck at suse.com mwilck at suse.com
Tue Jan 26 15:32:54 EST 2021


From: Martin Wilck <mwilck at suse.com>

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 monitor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/monitor.c b/monitor.c
index 63e26bc..a6c8905 100644
--- a/monitor.c
+++ b/monitor.c
@@ -58,6 +58,10 @@ static int create_udev_monitor(struct udev_monitor **pmon)
 	if (!mon)
 		return errno ? -errno : -ENOMEM;
 
+	/* Add match for NVMe controller devices */
+	ret = udev_monitor_filter_add_match_subsystem_devtype(mon, "nvme", NULL);
+	/* Add match for fc_udev_device */
+	ret = udev_monitor_filter_add_match_subsystem_devtype(mon, "fc", NULL);
 	/*
 	 * This fails in unpriviliged mode. Use the same value as udevd.
 	 * We may able to decrease this buffer size later.
-- 
2.29.2




More information about the Linux-nvme mailing list