summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-01-20 12:36:28 (GMT)
committerThomas Haller <thaller@redhat.com>2017-01-20 12:37:28 (GMT)
commit3dd2a0f26fa59896b4b4a262cf309a4be4aa70d3 (patch)
tree2f1ceedc9a06e4ca4ff1923d80ff6a4c3d4d8279 /lib
parent6593e209f5b18f536b3d1756a1e0345e058e4da9 (diff)
downloadlibnl-3dd2a0f26fa59896b4b4a262cf309a4be4aa70d3.zip
libnl-3dd2a0f26fa59896b4b4a262cf309a4be4aa70d3.tar.gz
libnl-3dd2a0f26fa59896b4b4a262cf309a4be4aa70d3.tar.bz2
lib: fix comment for nl_recv() about return value for non-blocking read
Since commit 375a6294a41e003f873821a01d947f0ecfaf76d4, nl_recv() would fail with -NLE_AGAIN if there is nothing to read. Fix the documentation. https://github.com/thom311/libnl/issues/129
Diffstat (limited to 'lib')
-rw-r--r--lib/nl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/nl.c b/lib/nl.c
index f2c427b..1b4355b 100644
--- a/lib/nl.c
+++ b/lib/nl.c
@@ -621,7 +621,9 @@ errout:
*
* This function blocks until data is available to be read unless the socket
* has been put into non-blocking mode using nl_socket_set_nonblocking() in
- * which case this function will return immediately with a return value of 0.
+ * which case this function will return immediately with a return value of
+ * -NLA_AGAIN (versions before 3.2.22 returned instead 0, in which case you
+ * should check first clear errno and then check for errno EAGAIN).
*
* The buffer size used when reading from the netlink socket and thus limiting
* the maximum size of a netlink message that can be read defaults to the size