From d2a49f2c8662f176d66fe4cd0c886c7f1e1cabf7 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 4 Sep 2012 20:51:25 +0000 Subject: [PATCH] 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. --- tools/tools/netmap/pkt-gen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/netmap/pkt-gen.c b/tools/tools/netmap/pkt-gen.c index 4aa09d37de48..d0e64094edb8 100644 --- a/tools/tools/netmap/pkt-gen.c +++ b/tools/tools/netmap/pkt-gen.c @@ -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");