dect
/
libnl
Archived
13
0
Fork 0

Add NLE_NODEV error

This commit is contained in:
Thomas Graf 2011-03-24 16:56:10 +01:00
parent 14fa557ba9
commit 93b6c114a8
2 changed files with 4 additions and 1 deletions

View File

@ -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 *);

View File

@ -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;
}
}