summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-05 09:40:58 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-05 09:40:58 +0000
commit92972280af2cf3a37c6f4928337f6a8fdd152f3d (patch)
tree30c02830286e65509ce19b58bc31f6229fd2fac5 /source3/utils
parentdcecbc52a9f8f6baf04298adf373407e3e149cd1 (diff)
downloadsamba-92972280af2cf3a37c6f4928337f6a8fdd152f3d.tar.gz
samba-92972280af2cf3a37c6f4928337f6a8fdd152f3d.tar.bz2
samba-92972280af2cf3a37c6f4928337f6a8fdd152f3d.zip
added -O (use oplocks) option to locktest
(This used to be commit 56ba49382fbdbe5672c3a72faaca21f20a53752b)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/locktest.c9
1 files changed, 8 insertions, 1 deletions
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;