summaryrefslogtreecommitdiffstats
path: root/source
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
commit56ba49382fbdbe5672c3a72faaca21f20a53752b (patch)
tree17b368ad96ea1d7fb9f0bb1e649ea8b0753c19e2 /source
parentc602b703a05b94748a890add751f47fc6b539c60 (diff)
downloadsamba-56ba49382fbdbe5672c3a72faaca21f20a53752b.tar.gz
samba-56ba49382fbdbe5672c3a72faaca21f20a53752b.tar.xz
samba-56ba49382fbdbe5672c3a72faaca21f20a53752b.zip
added -O (use oplocks) option to locktest
Diffstat (limited to 'source')
-rw-r--r--source/utils/locktest.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/utils/locktest.c b/source/utils/locktest.c
index 2c24b7d36e9..ec121956d55 100644
--- a/source/utils/locktest.c
+++ b/source/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;