summaryrefslogtreecommitdiffstats
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
commitefc9752f1e00b38abe3b5d3a98627a9fe6122bc4 (patch)
tree78178826638ea380c51eea4e70c459e0b91b31d4
parentb3999f3b20d470b9c873b297e7aeb043da61588d (diff)
downloadsamba-efc9752f1e00b38abe3b5d3a98627a9fe6122bc4.tar.gz
samba-efc9752f1e00b38abe3b5d3a98627a9fe6122bc4.tar.xz
samba-efc9752f1e00b38abe3b5d3a98627a9fe6122bc4.zip
nasty hack to print posix locks
-rw-r--r--source/utils/locktest.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/utils/locktest.c b/source/utils/locktest.c
index 3b2d2be13e8..7aa32325a44 100644
--- a/source/utils/locktest.c
+++ b/source/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
}
/*****************************************************