[Cluster-devel] cluster/dlm/tool main.c

teigland at sourceware.org teigland at sourceware.org
Tue Jun 5 18:25:33 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2007-06-05 18:25:32

Modified files:
	dlm/tool       : main.c 

Log message:
	report an error if no lockspace name is provided

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm/tool/main.c.diff?cvsroot=cluster&r1=1.1&r2=1.2

--- cluster/dlm/tool/main.c	2007/05/18 16:39:51	1.1
+++ cluster/dlm/tool/main.c	2007/06/05 18:25:32	1.2
@@ -123,7 +123,12 @@
 		exit(EXIT_FAILURE);
 	}
 
-	lsname = argv[opt_ind];
+	if (optind < argc - 1)
+		lsname = argv[opt_ind];
+	else {
+		fprintf(stderr, "lockspace name required\n");
+		exit(EXIT_FAILURE);
+	}
 }
 
 void do_join(char *name)




More information about the Cluster-devel mailing list