From 79e79beff8dfee6a10a79eba8ac0bbecbff7e782 Mon Sep 17 00:00:00 2001 From: vitaly Date: Wed, 22 Apr 2009 13:37:05 +0000 Subject: [PATCH] Branch HEAD b=15977 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 fc1248b..df15cd0 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -627,7 +627,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