commit af597f1103f4c20d02c90d775742130c4b349d1b Author: Sam Thursfield Date: Mon Jun 18 12:36:37 2012 +0100 libudev: Fix documentation for udev_monitor_receive_device() diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c index 32319ac..aa6dbe9 100644 --- a/src/libudev/libudev-monitor.c +++ b/src/libudev/libudev-monitor.c @@ -489,15 +489,22 @@ tag: * udev_monitor_receive_device: * @udev_monitor: udev monitor * - * Receive data from the udev monitor socket, allocate a new udev - * device, fill in the received data, and return the device. + * Receive data from the udev monitor socket, allocate a + * new udev device, fill in the received data, and return the device. + * + * It is an error to call this function if there is no data available. + * The function will return #NULL in this case. You should monitor the + * file handle returned by udev_monitor_get_fd() to ensure data is available + * before calling. Note that the behaviour of this function changed in + * libudev 171. Code that assumes this function will block should be changed + * to use poll(). * * Only socket connections with uid=0 are accepted. * * The initial refcount is 1, and needs to be decremented to * release the resources of the udev device. * - * Returns: a new udev device, or #NULL, in case of an error + * Returns: a new udev device if available, or #NULL **/ _public_ struct udev_device *udev_monitor_receive_device(struct udev_monitor *udev_monitor) {