[Pcsclite-cvs-commit] CVS PCSC/src

CVS User rousseau ludovic.rousseau@free.fr
Tue, 22 Mar 2005 04:01:02 -0700


Update of /cvsroot/pcsclite/PCSC/src
In directory haydn:/tmp/cvs-serv11563

Modified Files:
	pcscdaemon.c 
Log Message:
main(): print usage and exit if a unknown parameter is passed


--- /cvsroot/pcsclite/PCSC/src/pcscdaemon.c	2005/02/22 14:38:33	1.56
+++ /cvsroot/pcsclite/PCSC/src/pcscdaemon.c	2005/03/22 11:00:59	1.57
@@ -7,7 +7,7 @@
  *  David Corcoran <corcoran@linuxnet.com>
  *  Ludovic Rousseau <ludovic.rousseau@free.fr>
  *
- * $Id: pcscdaemon.c,v 1.56 2005/02/22 14:38:33 rousseau Exp $
+ * $Id: pcscdaemon.c,v 1.57 2005/03/22 11:00:59 rousseau Exp $
  */
 
 #include "config.h"
@@ -279,6 +279,13 @@
 
 	}
 	
+	if (argv[optind])
+	{
+		printf("Unknown option: %s\n\n", argv[optind]);
+		print_usage(argv[0]);
+		return EXIT_SUCCESS;
+	}
+
 	/*
 	 * test the presence of /var/run/pcsc.pub
 	 */