diff options
author | Thomas Haller <thaller@redhat.com> | 2014-11-26 17:13:37 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-11-27 09:24:03 (GMT) |
commit | 8b023fd441c3fd96aad2acca31d2702b1aa1f21e (patch) | |
tree | 9f6a82b965ea735a6a4ece3a54434cf865e70eb0 /include | |
parent | 16d16b9a76db9411bf8c019db39e7e66d6114a8f (diff) | |
download | libnl-8b023fd441c3fd96aad2acca31d2702b1aa1f21e.zip libnl-8b023fd441c3fd96aad2acca31d2702b1aa1f21e.tar.gz libnl-8b023fd441c3fd96aad2acca31d2702b1aa1f21e.tar.bz2 |
nl: add function nl_pickup_keep_syserr()
nl_pickup() converts error codes from netlink into
nl error codes using nl_syserr2nlerr(). The latter function
mangles different error codes to the same nl error code.
Add a new function, that returns both the nl error code
and the original error code.
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/netlink.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/netlink/netlink.h b/include/netlink/netlink.h index 61656b3..f8f2082 100644 --- a/include/netlink/netlink.h +++ b/include/netlink/netlink.h @@ -87,6 +87,11 @@ extern int nl_pickup(struct nl_sock *, struct nlmsghdr *, struct nl_parser_param *), struct nl_object **); +extern int nl_pickup_keep_syserr(struct nl_sock *sk, + int (*parser)(struct nl_cache_ops *, struct sockaddr_nl *, + struct nlmsghdr *, struct nl_parser_param *), + struct nl_object **result, + int *syserror); /* Netlink Family Translations */ extern char * nl_nlfamily2str(int, char *, size_t); extern int nl_str2nlfamily(const char *); |