chiark / gitweb /
libudev: monitor - export filter_update()
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 23 Apr 2009 16:05:10 +0000 (18:05 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 23 Apr 2009 16:05:10 +0000 (18:05 +0200)
udev/lib/exported_symbols
udev/lib/libudev-monitor.c
udev/lib/libudev.h

index 5b0d8fd..24a6595 100644 (file)
@@ -57,6 +57,7 @@ udev_monitor_get_udev
 udev_monitor_get_fd
 udev_monitor_receive_device
 udev_monitor_filter_add_match_subsystem_devtype
 udev_monitor_get_fd
 udev_monitor_receive_device
 udev_monitor_filter_add_match_subsystem_devtype
+udev_monitor_filter_update
 udev_monitor_filter_remove
 udev_queue_new
 udev_queue_ref
 udev_monitor_filter_remove
 udev_queue_new
 udev_queue_ref
index bf95657..c87ff74 100644 (file)
@@ -223,7 +223,7 @@ static inline void bpf_jmp(struct sock_filter *inss, unsigned int *i,
        (*i)++;
 }
 
        (*i)++;
 }
 
-static int filter_apply(struct udev_monitor *udev_monitor)
+int udev_monitor_filter_update(struct udev_monitor *udev_monitor)
 {
        static struct sock_filter ins[256];
        static struct sock_fprog filter;
 {
        static struct sock_filter ins[256];
        static struct sock_fprog filter;
@@ -290,7 +290,7 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
                err = bind(udev_monitor->sock,
                           (struct sockaddr *)&udev_monitor->sun, udev_monitor->addrlen);
        } else if (udev_monitor->snl.nl_family != 0) {
                err = bind(udev_monitor->sock,
                           (struct sockaddr *)&udev_monitor->sun, udev_monitor->addrlen);
        } else if (udev_monitor->snl.nl_family != 0) {
-               filter_apply(udev_monitor);
+               udev_monitor_filter_update(udev_monitor);
                err = bind(udev_monitor->sock,
                           (struct sockaddr *)&udev_monitor->snl, sizeof(struct sockaddr_nl));
        } else {
                err = bind(udev_monitor->sock,
                           (struct sockaddr *)&udev_monitor->snl, sizeof(struct sockaddr_nl));
        } else {
index 0b52e6e..236e43b 100644 (file)
@@ -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 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_get_fd(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_update(struct udev_monitor *udev_monitor);
 extern int udev_monitor_filter_remove(struct udev_monitor *udev_monitor);
 
 /* sys enumeration */
 extern int udev_monitor_filter_remove(struct udev_monitor *udev_monitor);
 
 /* sys enumeration */