From: vitaly Date: Wed, 22 Apr 2009 14:08:09 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: GIT_EPOCH_B_RELEASE_1_8_1~2^4~1 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=c1d61730ddd5024601ebdfb7b51346e87391db16;p=fs%2Flustre-release.git 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. --- 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));