From a6280d37c618223bab87b6f7d338070de55f27b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 5 May 2000 01:11:23 +0000 Subject: nasty hack to print posix locks (This used to be commit efc9752f1e00b38abe3b5d3a98627a9fe6122bc4) --- source3/utils/locktest.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3') diff --git a/source3/utils/locktest.c b/source3/utils/locktest.c index 3b2d2be13e8..7aa32325a44 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 } /***************************************************** -- cgit