kdump: append newline to the last lien of vmcoreinfo note
authorVivek Goyal <[email protected]>
Mon, 30 Jul 2012 21:42:36 +0000 (14:42 -0700)
committerLinus Torvalds <[email protected]>
Tue, 31 Jul 2012 00:25:20 +0000 (17:25 -0700)
The last line of vmcoreinfo note does not end with \n.  Parsing all the
lines in note becomes easier if all lines end with \n instead of trying to
special case the last line.

I know at least one tool, vmcore-dmesg in kexec-tools tree which made the
assumption that all lines end with \n.  I think it is a good idea to fix
it.

Signed-off-by: Vivek Goyal <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Atsushi Kumagai <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kexec.c

index 4e2e472f6aeb35e5fb78e9a6ccdcc4c08fae57e3..0668d58d6413e8eeb8736b234be6d8d7378a4bea 100644 (file)
@@ -1424,7 +1424,7 @@ static void update_vmcoreinfo_note(void)
 
 void crash_save_vmcoreinfo(void)
 {
-       vmcoreinfo_append_str("CRASHTIME=%ld", get_seconds());
+       vmcoreinfo_append_str("CRASHTIME=%ld\n", get_seconds());
        update_vmcoreinfo_note();
 }