mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: linux kernel mailing list <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH] kdump: Append newline to the last lien of vmcoreinfo note
Date: Wed, 18 Jul 2012 15:04:39 -0700	[thread overview]
Message-ID: <20120718150439.48360f16.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120717173655.GC11031@redhat.com>

On Tue, 17 Jul 2012 13:36:55 -0400
Vivek Goyal <vgoyal@redhat.com> wrote:

> 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 atleast 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 <vgoyal@redhat.com>
> ---
>  kernel/kexec.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/kernel/kexec.c
> ===================================================================
> --- linux-2.6.orig/kernel/kexec.c	2012-07-17 19:26:38.844033784 -0400
> +++ linux-2.6/kernel/kexec.c	2012-07-17 23:51:33.311701781 -0400
> @@ -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();
>  }

huh, that was a screwup.  And now we have to make what must be
viewed as a non-back-compatible ABI change.

Ho hum, presumably there isn't a lot of code out there which is
dependent upon a non-newline-terminated CRASHTIME record.

Why did this work at all, anyway?  Is CRASHTIME always the last-emitted
record?

  reply	other threads:[~2012-07-18 22:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 17:36 Vivek Goyal
2012-07-18 22:04 ` Andrew Morton [this message]
2012-07-19 13:49   ` Vivek Goyal
2012-07-20  4:44     ` Atsushi Kumagai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120718150439.48360f16.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome