[netfilter-cvslog] r3285 - trunk/nfsim/core

rusty at netfilter.org rusty at netfilter.org
Fri Nov 19 03:24:12 CET 2004


Author: rusty at netfilter.org
Date: 2004-11-19 03:24:11 +0100 (Fri, 19 Nov 2004)
New Revision: 3285

Modified:
   trunk/nfsim/core/message.c
   trunk/nfsim/core/tui.c
Log:
Abort if command is crap.


Modified: trunk/nfsim/core/message.c
===================================================================
--- trunk/nfsim/core/message.c	2004-11-18 22:59:36 UTC (rev 3284)
+++ trunk/nfsim/core/message.c	2004-11-19 02:24:11 UTC (rev 3285)
@@ -96,8 +96,6 @@
 	if (len != sizeof(msg))
 		return -1;
 
-	fprintf(stderr, "%s: received %u bytes\n", __FUNCTION__, len);
-
 	if (msg.type == UM_SYSCALL) {
 		switch (msg.opcode) {
 

Modified: trunk/nfsim/core/tui.c
===================================================================
--- trunk/nfsim/core/tui.c	2004-11-18 22:59:36 UTC (rev 3284)
+++ trunk/nfsim/core/tui.c	2004-11-19 02:24:11 UTC (rev 3285)
@@ -233,7 +233,10 @@
 		}
 		do_post_commands(cmd->name);
 	} else {
-		nfsim_log(LOG_UI, "%s: command not found", argv[0]);
+		/* Someone might expect this command not to be found? */
+		if (!nfsim_log(LOG_UI, "%s: command not found", argv[0])
+		    && tui_abort_on_fail)
+			exit(1);
 	}
 }
 




More information about the netfilter-cvslog mailing list