Add NLE_NODEV error
This commit is contained in:
parent
14fa557ba9
commit
93b6c114a8
|
@ -47,8 +47,9 @@ extern "C" {
|
||||||
#define NLE_PERM 28
|
#define NLE_PERM 28
|
||||||
#define NLE_PKTLOC_FILE 29
|
#define NLE_PKTLOC_FILE 29
|
||||||
#define NLE_PARSE_ERR 30
|
#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 const char * nl_geterror(int);
|
||||||
extern void nl_perror(int, const char *);
|
extern void nl_perror(int, const char *);
|
||||||
|
|
|
@ -44,6 +44,7 @@ static const char *errmsg[NLE_MAX+1] = {
|
||||||
[NLE_PERM] = "Operation not permitted",
|
[NLE_PERM] = "Operation not permitted",
|
||||||
[NLE_PKTLOC_FILE] = "Unable to open packet location file",
|
[NLE_PKTLOC_FILE] = "Unable to open packet location file",
|
||||||
[NLE_PARSE_ERR] = "Unable to parse object",
|
[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 EPERM: return NLE_PERM;
|
||||||
case EBUSY: return NLE_BUSY;
|
case EBUSY: return NLE_BUSY;
|
||||||
case ERANGE: return NLE_RANGE;
|
case ERANGE: return NLE_RANGE;
|
||||||
|
case ENODEV: return NLE_NODEV;
|
||||||
default: return NLE_FAILURE;
|
default: return NLE_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue