From: Kay Sievers Date: Fri, 7 May 2010 21:04:42 +0000 (+0200) Subject: libudev: add documentation for recently added functions X-Git-Tag: 174~500 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=f712894dd4c2a2d8e374de133b7ed854e203fa96 libudev: add documentation for recently added functions --- diff --git a/libudev/docs/libudev-sections.txt b/libudev/docs/libudev-sections.txt index 3f8c107a1..63c0ee2e9 100644 --- a/libudev/docs/libudev-sections.txt +++ b/libudev/docs/libudev-sections.txt @@ -47,6 +47,7 @@ udev_device_get_sysnum udev_device_get_devnode udev_device_get_devlinks_list_entry udev_device_get_properties_list_entry +udev_device_get_tags_list_entry udev_device_get_property_value udev_device_get_driver udev_device_get_devnum @@ -65,6 +66,7 @@ udev_monitor_get_udev udev_monitor_new_from_netlink udev_monitor_new_from_socket udev_monitor_enable_receiving +udev_monitor_set_receive_buffer_size udev_monitor_get_fd udev_monitor_receive_device udev_monitor_filter_add_match_subsystem_devtype diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c index a6a1ecb4e..7e6b7f1ce 100644 --- a/libudev/libudev-device.c +++ b/libudev/libudev-device.c @@ -1287,6 +1287,17 @@ void udev_device_cleanup_tags_list(struct udev_device *udev_device) udev_list_cleanup_entries(udev_device->udev, &udev_device->tags_list); } +/** + * udev_device_get_tags_list_entry: + * @udev_device: udev device + * + * Retrieve the list of tags attached to the udev device. The next + * list entry can be retrieved with udev_list_entry_next(), + * which returns #NULL if no more entries exist. The tag string + * can be retrieved from the list entry by udev_list_get_name(). + * + * Returns: the first entry of the tag list + **/ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_device *udev_device) { if (udev_device == NULL) diff --git a/libudev/libudev-monitor.c b/libudev/libudev-monitor.c index 24e8aead2..b3e5d5f34 100644 --- a/libudev/libudev-monitor.c +++ b/libudev/libudev-monitor.c @@ -400,6 +400,16 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) return 0; } +/** + * udev_monitor_set_receive_buffer_size: + * @udev_monitor: the monitor which should receive events + * @size: the size in bytes + * + * Set the size of the kernel socket buffer. This call needs the + * appropriate privileges to succeed. + * + * Returns: 0 on success, otherwise -1 on error. + */ int udev_monitor_set_receive_buffer_size(struct udev_monitor *udev_monitor, int size) { if (udev_monitor == NULL)