From 92972280af2cf3a37c6f4928337f6a8fdd152f3d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 5 Jun 2000 09:40:58 +0000 Subject: added -O (use oplocks) option to locktest (This used to be commit 56ba49382fbdbe5672c3a72faaca21f20a53752b) --- source3/utils/locktest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/utils/locktest.c b/source3/utils/locktest.c index 2c24b7d36e..ec121956d5 100644 --- a/source3/utils/locktest.c +++ b/source3/utils/locktest.c @@ -30,6 +30,7 @@ static int numops = 1000; static BOOL showall; static BOOL analyze; static BOOL hide_unlock_fails; +static BOOL use_oplocks; #define FILENAME "\\locktest.dat" #define LOCKRANGE 100 @@ -188,6 +189,8 @@ struct cli_state *connect_one(char *share) DEBUG(4,(" tconx ok\n")); + c->use_oplocks = use_oplocks; + return c; } @@ -461,6 +464,7 @@ static void usage(void) -o numops\n\ -u hide unlock fails\n\ -a (show all ops)\n\ + -O use oplocks\n\ "); } @@ -511,7 +515,7 @@ static void usage(void) seed = time(NULL); - while ((opt = getopt(argc, argv, "U:s:ho:aAW:")) != EOF) { + while ((opt = getopt(argc, argv, "U:s:ho:aAW:O")) != EOF) { switch (opt) { case 'U': pstrcpy(username,optarg); @@ -531,6 +535,9 @@ static void usage(void) case 'o': numops = atoi(optarg); break; + case 'O': + use_oplocks = True; + break; case 'a': showall = True; break; -- cgit