Skip to contentSkip to conversation

cluster/dlm/tool main.c

Cluster-devel [email protected] 1 participant 1 message Jun 5, 2007

lore
Share & tools
lore
#0 lore raw

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

dlm/tool/main.c +6 -1
@@ -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)