Skip to content

Commit

Permalink
kdump: append newline to the last lien of vmcoreinfo note
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rhvgoyal authored and torvalds committed Jul 31, 2012
1 parent f19b9f7 commit 63dca8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 63dca8d

Please sign in to comment.