summaryrefslogtreecommitdiff
path: root/source3/utils/locktest.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-05 01:11:23 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-05 01:11:23 +0000
commita6280d37c618223bab87b6f7d338070de55f27b9 (patch)
tree83d2ec6cb3198ff9d171b16bd0cb4be9dce397d3 /source3/utils/locktest.c
parentc7845863bb4e2e98a3cd2ee1e61a5cf448723863 (diff)
downloadsamba-a6280d37c618223bab87b6f7d338070de55f27b9.tar.gz
samba-a6280d37c618223bab87b6f7d338070de55f27b9.tar.bz2
samba-a6280d37c618223bab87b6f7d338070de55f27b9.zip
nasty hack to print posix locks
(This used to be commit efc9752f1e00b38abe3b5d3a98627a9fe6122bc4)
Diffstat (limited to 'source3/utils/locktest.c')
-rw-r--r--source3/utils/locktest.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/utils/locktest.c b/source3/utils/locktest.c
index 3b2d2be13e..7aa32325a4 100644
--- a/source3/utils/locktest.c
+++ b/source3/utils/locktest.c
@@ -42,6 +42,9 @@ static BOOL analyze;
#define NFILES 2
#define LOCK_TIMEOUT 0
+#define NASTY_POSIX_LOCK_HACK 1
+
+
struct record {
char r1, r2;
char conn, f;
@@ -74,6 +77,20 @@ static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid,
(int)pid, (int)dev, (int)ino,
lock_type==READ_LOCK?"R":"W",
(double)start, (double)size);
+
+#if NASTY_POSIX_LOCK_HACK
+ {
+ pstring cmd;
+ static SMB_INO_T lastino;
+
+ if (lastino != ino) {
+ slprintf(cmd, sizeof(cmd),
+ "egrep POSIX.*%d /proc/locks", (int)ino);
+ system(cmd);
+ }
+ lastino = ino;
+ }
+#endif
}
/*****************************************************