diff options
author | Thomas Graf <tgraf@suug.ch> | 2011-03-24 15:56:10 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2011-03-24 15:56:10 (GMT) |
commit | 93b6c114a8fa21e5e907a5b2415c7ffb441b0a8f (patch) | |
tree | f380f6951c47d9c0098bf708e175d90a168519b0 | |
parent | 14fa557ba94a4243b5963ea137412c5e1204ecb5 (diff) | |
download | libnl-93b6c114a8fa21e5e907a5b2415c7ffb441b0a8f.zip libnl-93b6c114a8fa21e5e907a5b2415c7ffb441b0a8f.tar.gz libnl-93b6c114a8fa21e5e907a5b2415c7ffb441b0a8f.tar.bz2 |
Add NLE_NODEV error
-rw-r--r-- | include/netlink/errno.h | 3 | ||||
-rw-r--r-- | lib/error.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/netlink/errno.h b/include/netlink/errno.h index dde12b7..93dc163 100644 --- a/include/netlink/errno.h +++ b/include/netlink/errno.h @@ -47,8 +47,9 @@ extern "C" { #define NLE_PERM 28 #define NLE_PKTLOC_FILE 29 #define NLE_PARSE_ERR 30 +#define NLE_NODEV 31 -#define NLE_MAX NLE_PARSE_ERR +#define NLE_MAX NLE_NODEV extern const char * nl_geterror(int); extern void nl_perror(int, const char *); diff --git a/lib/error.c b/lib/error.c index 02cbbf1..a31461e 100644 --- a/lib/error.c +++ b/lib/error.c @@ -44,6 +44,7 @@ static const char *errmsg[NLE_MAX+1] = { [NLE_PERM] = "Operation not permitted", [NLE_PKTLOC_FILE] = "Unable to open packet location file", [NLE_PARSE_ERR] = "Unable to parse object", +[NLE_NODEV] = "No such device", }; /** @@ -103,6 +104,7 @@ int nl_syserr2nlerr(int error) case EPERM: return NLE_PERM; case EBUSY: return NLE_BUSY; case ERANGE: return NLE_RANGE; + case ENODEV: return NLE_NODEV; default: return NLE_FAILURE; } } |