diff --git a/sys/net/netmap_user.h b/sys/net/netmap_user.h index 5faf671b8976..aab6c358de73 100644 --- a/sys/net/netmap_user.h +++ b/sys/net/netmap_user.h @@ -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,7 +543,8 @@ fail: nm_close(d); if (errmsg) D("%s %s", errmsg, ifname); - errno = EINVAL; + if (errno == 0) + errno = EINVAL; return NULL; }