return kernel-supplied error if available.
Also fix field names in a comment.
This commit is contained in:
parent
8bcd603968
commit
0506889c15
@ -40,7 +40,7 @@
|
||||
* From there:
|
||||
* struct netmap_ring *NETMAP_TXRING(nifp, index)
|
||||
* struct netmap_ring *NETMAP_RXRING(nifp, index)
|
||||
* we can access ring->nr_cur, ring->nr_avail, ring->nr_flags
|
||||
* we can access ring->cur, ring->head, ring->tail, etc.
|
||||
*
|
||||
* ring->slot[i] gives us the i-th slot (we can access
|
||||
* directly len, flags, buf_idx)
|
||||
@ -543,6 +543,7 @@ nm_open(const char *ifname, const struct nmreq *req,
|
||||
nm_close(d);
|
||||
if (errmsg)
|
||||
D("%s %s", errmsg, ifname);
|
||||
if (errno == 0)
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user