svn commit: r240103 - head/tools/tools/netmap
Ed Maste
emaste at FreeBSD.org
Tue Sep 4 20:51:25 UTC 2012
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");
More information about the svn-src-head
mailing list