[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland 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)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]