Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2012 20:51:25 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r240103 - head/tools/tools/netmap
Message-ID:  <201209042051.q84KpPip017082@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Tue Sep  4 20:51:25 2012
New Revision: 240103
URL: http://svn.freebsd.org/changeset/base/240103

Log:
  Failure to open netmap device is unrecoverable.
  
  There's no reason to "fail later" since there's nothing this tool can do in
  netmap mode without /dev/netmap open.

Modified:
  head/tools/tools/netmap/pkt-gen.c

Modified: head/tools/tools/netmap/pkt-gen.c
==============================================================================
--- head/tools/tools/netmap/pkt-gen.c	Tue Sep  4 20:45:59 2012	(r240102)
+++ head/tools/tools/netmap/pkt-gen.c	Tue Sep  4 20:51:25 2012	(r240103)
@@ -892,7 +892,7 @@ main(int arc, char **argv)
 	fd = open("/dev/netmap", O_RDWR);
 	if (fd == -1) {
 		D("Unable to open /dev/netmap");
-		// fail later
+		exit(1);
 	} else {
 		if ((ioctl(fd, NIOCGINFO, &nmr)) == -1) {
 			D("Unable to get if info without name");



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