Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2014 08:31:57 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274338 - head/sys/net
Message-ID:  <201411100831.sAA8VvIf028192@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Mon Nov 10 08:31:56 2014
New Revision: 274338
URL: https://svnweb.freebsd.org/changeset/base/274338

Log:
  return kernel-supplied error if available.
  Also fix field names in a comment.

Modified:
  head/sys/net/netmap_user.h

Modified: head/sys/net/netmap_user.h
==============================================================================
--- head/sys/net/netmap_user.h	Mon Nov 10 08:20:21 2014	(r274337)
+++ head/sys/net/netmap_user.h	Mon Nov 10 08:31:56 2014	(r274338)
@@ -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;
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411100831.sAA8VvIf028192>