From mboxrd@z Thu Jan 1 00:00:00 1970 From: teigland@sourceware.org Date: 5 Jun 2007 18:25:33 -0000 Subject: [Cluster-devel] cluster/dlm/tool main.c Message-ID: <20070605182533.1741.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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)