diff options
author | Thomas Haller <thaller@redhat.com> | 2017-01-20 12:36:28 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-01-20 12:37:28 (GMT) |
commit | 3dd2a0f26fa59896b4b4a262cf309a4be4aa70d3 (patch) | |
tree | 2f1ceedc9a06e4ca4ff1923d80ff6a4c3d4d8279 /lib | |
parent | 6593e209f5b18f536b3d1756a1e0345e058e4da9 (diff) | |
download | libnl-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |