cluster: STABLE3 - dlmtest2: fix
David Teigland
teigland@fedoraproject.org
Wed Feb 18 17:30:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1f6ebd71874ba687be48cd4f1b07775e9e2e46d0
Commit: 1f6ebd71874ba687be48cd4f1b07775e9e2e46d0
Parent: 4ee81b60d86a4147b35cf71c41bfe24a2a8632cb
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Feb 18 11:27:00 2009 -0600
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Feb 18 11:28:37 2009 -0600
dlmtest2: fix
Signed-off-by: David Teigland <teigland@redhat.com>
---
dlm/tests/usertest/dlmtest2.c | 19 +++----------------
1 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/dlm/tests/usertest/dlmtest2.c b/dlm/tests/usertest/dlmtest2.c
index da63b93..96e6a16 100644
--- a/dlm/tests/usertest/dlmtest2.c
+++ b/dlm/tests/usertest/dlmtest2.c
@@ -44,7 +44,6 @@ static int stress_lock_only = 0;
static int openclose_ls = 0;
static uint64_t our_xid;
static char cmd[32];
-static int opt_cmd = 0;
static unsigned int sts_eunlock, sts_ecancel, sts_etimedout, sts_edeadlk, sts_eagain, sts_other, sts_zero;
static unsigned int bast_unlock, bast_skip;
@@ -1020,10 +1019,8 @@ static void process_command(int *quit)
char inbuf[132];
int x = 0, y = 0;
- if (!opt_cmd) {
- fgets(inbuf, sizeof(inbuf), stdin);
- sscanf(inbuf, "%s %d %d", cmd, &x, &y);
- }
+ fgets(inbuf, sizeof(inbuf), stdin);
+ sscanf(inbuf, "%s %d %d", cmd, &x, &y);
if (!strncmp(cmd, "EXIT", 4)) {
*quit = 1;
@@ -1260,7 +1257,7 @@ static void decode_arguments(int argc, char **argv)
int optchar;
while (cont) {
- optchar = getopt(argc, argv, "n:r:c:i:thVoq:v:");
+ optchar = getopt(argc, argv, "n:r:i:thVoq:v:");
switch (optchar) {
@@ -1272,11 +1269,6 @@ static void decode_arguments(int argc, char **argv)
maxr = atoi(optarg);
break;
- case 'c':
- strcpy(cmd, optarg);
- opt_cmd = 1;
- break;
-
case 'i':
iterations = atoi(optarg);
break;
@@ -1413,11 +1405,6 @@ int main(int argc, char *argv[])
client_add(libdlm_fd, &maxi);
- if (cmd) {
- process_command(&quit);
- goto out;
- }
-
client_add(STDIN_FILENO, &maxi);
printf("Type EXIT to finish, help for usage\n");
More information about the Cluster-cvs
mailing list