This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
static BOOL hide_unlock_fails;
static BOOL use_oplocks;
+extern char *optarg;
+extern int optind;
+
#define FILENAME "\\locktest.dat"
#define LOCKRANGE 100
#define LOCKBASE 0
return False;
}
-static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, struct process_id pid,
+static void print_brl(struct file_id id, struct server_id pid,
enum brl_type lock_type,
- br_off start, br_off size)
+ enum brl_flavour lock_flav,
+ br_off start, br_off size,
+ void *private_data)
{
- printf("%6d %05x:%05x %s %.0f:%.0f(%.0f)\n",
- (int)procid_to_pid(&pid), (int)dev, (int)ino,
+ printf("%6d %s %s %.0f:%.0f(%.0f)\n",
+ (int)procid_to_pid(&pid), file_id_static_string(&id),
lock_type==READ_LOCK?"R":"W",
(double)start, (double)start+size-1,(double)size);
op==READ_LOCK?"READ_LOCK":"WRITE_LOCK",
ret[0], ret[1]);
}
- if (showall) brl_forall(print_brl);
+ if (showall) brl_forall(print_brl, NULL);
if (ret[0] != ret[1]) return False;
} else if (r2 < LOCK_PCT+UNLOCK_PCT) {
/* unset a lock */
start, start+len-1, len,
ret[0], ret[1]);
}
- if (showall) brl_forall(print_brl);
+ if (showall) brl_forall(print_brl, NULL);
if (!hide_unlock_fails && ret[0] != ret[1]) return False;
} else {
/* reopen the file */
if (showall) {
printf("reopen conn=%u fstype=%u f=%u\n",
conn, fstype, f);
- brl_forall(print_brl);
+ brl_forall(print_brl, NULL);
}
}
return True;
int main(int argc,char *argv[])
{
char *share1, *share2, *nfspath1, *nfspath2;
- extern char *optarg;
- extern int optind;
int opt;
char *p;
int seed;