mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-31 07:51:08 +03:00
libudev: monitor - add udev_monitor_filter_remove
This commit is contained in:
parent
bb7045a0a3
commit
08a7a795f6
@ -57,6 +57,7 @@ udev_monitor_get_udev
|
|||||||
udev_monitor_get_fd
|
udev_monitor_get_fd
|
||||||
udev_monitor_receive_device
|
udev_monitor_receive_device
|
||||||
udev_monitor_filter_add_match_subsystem_devtype
|
udev_monitor_filter_add_match_subsystem_devtype
|
||||||
|
udev_monitor_filter_remove
|
||||||
udev_queue_new
|
udev_queue_new
|
||||||
udev_queue_ref
|
udev_queue_ref
|
||||||
udev_queue_unref
|
udev_queue_unref
|
||||||
|
@ -707,3 +707,11 @@ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_mo
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int udev_monitor_filter_remove(struct udev_monitor *udev_monitor)
|
||||||
|
{
|
||||||
|
static struct sock_fprog filter = { 0, NULL };
|
||||||
|
|
||||||
|
udev_list_cleanup_entries(udev_monitor->udev, &udev_monitor->filter_subsystem_list);
|
||||||
|
return setsockopt(udev_monitor->sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter));
|
||||||
|
}
|
||||||
|
@ -85,6 +85,7 @@ extern struct udev *udev_monitor_get_udev(struct udev_monitor *udev_monitor);
|
|||||||
extern int udev_monitor_get_fd(struct udev_monitor *udev_monitor);
|
extern int udev_monitor_get_fd(struct udev_monitor *udev_monitor);
|
||||||
extern struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor);
|
extern struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor);
|
||||||
extern int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype);
|
extern int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype);
|
||||||
|
extern int udev_monitor_filter_remove(struct udev_monitor *udev_monitor);
|
||||||
|
|
||||||
/* sys enumeration */
|
/* sys enumeration */
|
||||||
struct udev_enumerate;
|
struct udev_enumerate;
|
||||||
|
Loading…
Reference in New Issue
Block a user