From c1d61730ddd5024601ebdfb7b51346e87391db16 Mon Sep 17 00:00:00 2001 From: vitaly Date: Wed, 22 Apr 2009 14:08:09 +0000 Subject: [PATCH] Branch b1_6 b= i=deen i=vs lctl dk should zero the file before writing the debug log into, otherwise, if a file was long enough and is not completely overwritten we get a mix of several logs. --- lnet/utils/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnet/utils/debug.c b/lnet/utils/debug.c index e0128a3..973cac0 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -631,7 +631,7 @@ int jt_dbg_debug_kernel(int argc, char **argv) return 1; } if (argc > 1) { - fdout = open(argv[1], O_WRONLY | O_CREAT); + fdout = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC); if (fdout < 0) { fprintf(stderr, "fopen(%s) failed: %s\n", argv[1], strerror(errno)); -- 1.8.3.1