From e600c12b6b2cd4e0ad0d145b0ad6d0b92113392f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 29 Sep 2000 04:43:07 +0000 Subject: use the 64 bit locking interface in locktest (This used to be commit 1ece7f1ffd7d0b61d6acea03819fb857ea556b4b) --- source3/utils/locktest.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'source3') diff --git a/source3/utils/locktest.c b/source3/utils/locktest.c index c5d0472420..80dbba1e37 100644 --- a/source3/utils/locktest.c +++ b/source3/utils/locktest.c @@ -33,8 +33,8 @@ static BOOL hide_unlock_fails; static BOOL use_oplocks; #define FILENAME "\\locktest.dat" -#define LOCKRANGE 100 -#define LOCKBASE 0 +#define LOCKRANGE 1000 +#define LOCKBASE 0; /* #define LOCKBASE (0x40000000 - 50) @@ -55,7 +55,7 @@ static BOOL use_oplocks; struct record { char r1, r2; char conn, f; - unsigned start, len; + SMB_BIG_UINT start, len; char needed; }; @@ -236,8 +236,8 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], { unsigned conn = rec->conn; unsigned f = rec->f; - unsigned start = rec->start; - unsigned len = rec->len; + SMB_BIG_UINT start = rec->start; + SMB_BIG_UINT len = rec->len; unsigned r1 = rec->r1; unsigned r2 = rec->r2; unsigned op; @@ -253,14 +253,14 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], if (r2 < LOCK_PCT) { /* set a lock */ for (server=0;server %u:%u\n", + printf("lock conn=%u f=%u range=%.0f:%.0f(%.0f) op=%s -> %u:%u\n", conn, f, - start, start+len-1, len, + (double)start, (double)start+len-1, (double)len, op==READ_LOCK?"READ_LOCK":"WRITE_LOCK", ret[0], ret[1]); } @@ -269,14 +269,14 @@ static BOOL test_one(struct cli_state *cli[NSERVERS][NCONNECTIONS], } else if (r2 < LOCK_PCT+UNLOCK_PCT) { /* unset a lock */ for (server=0;server %u:%u\n", + printf("unlock conn=%u f=%u range=%.0f:%.0f(%.0f) -> %u:%u\n", conn, f, - start, start+len-1, len, + (double)start, (double)start+len-1, (double)len, ret[0], ret[1]); } if (showall || ret[0] != ret[1]) show_locks(); @@ -442,13 +442,13 @@ static void test_locks(char *share[NSERVERS]) close_files(cli, fnum); for (i=0;i