From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: WANG Chao <chaowang@redhat.com>
Cc: horms@verge.net.au, kexec@lists.infradead.org
Subject: Re: [PATCH] kexec: Replace printf() with die() to error out to stderr
Date: Tue, 14 May 2013 12:35:36 +0800 [thread overview]
Message-ID: <5191BF18.4000503@cn.fujitsu.com> (raw)
In-Reply-To: <1368503808-16601-1-git-send-email-chaowang@redhat.com>
于 2013年05月14日 11:56, WANG Chao 写道:
> Error messages are mixed stderr with stdout when we use die() along with
> printf(). So use die() to keep error out consistent.
Looks good to me.
Acked-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
>
> Signed-off-by: WANG Chao <chaowang@redhat.com>
> ---
> kexec/kexec.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/kexec/kexec.c b/kexec/kexec.c
> index 53d6edc..911c0f6 100644
> --- a/kexec/kexec.c
> +++ b/kexec/kexec.c
> @@ -1176,17 +1176,17 @@ int main(int argc, char *argv[])
> }
>
> if ((kexec_flags & KEXEC_ON_CRASH) && !is_crashkernel_mem_reserved()) {
> - printf("Memory for crashkernel is not reserved\n");
> - printf("Please reserve memory by passing ");
> - printf("\"crashkernel=X@Y\" parameter to the kernel\n");
> - die("Then try loading kdump kernel\n");
> + die("Memory for crashkernel is not reserved\n"
> + "Please reserve memory by passing"
> + "\"crashkernel=X@Y\" parameter to kernel\n"
> + "Then try to loading kdump kernel\n");
> }
>
> if (do_load && (kexec_flags & KEXEC_PRESERVE_CONTEXT) &&
> mem_max == ULONG_MAX) {
> - printf("Please specify memory range used by kexeced kernel\n");
> - printf("to preserve the context of original kernel with \n");
> - die("\"--mem-max\" parameter\n");
> + die("Please specify memory range used by kexeced kernel\n"
> + "to preserve the context of original kernel with \n"
> + "\"--mem-max\" parameter\n");
> }
>
> fileind = optind;
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-05-14 4:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 3:56 [PATCH] kexec: Replace printf() with die() to error out to stderr WANG Chao
2013-05-14 4:35 ` Zhang Yanfei [this message]
2013-05-14 4:35 ` Simon Horman
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=5191BF18.4000503@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=chaowang@redhat.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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