public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] kexec: Replace printf() with die() to error out to stderr
@ 2013-05-14  3:56 WANG Chao
  2013-05-14  4:35 ` Zhang Yanfei
  2013-05-14  4:35 ` Simon Horman
  0 siblings, 2 replies; 3+ messages in thread
From: WANG Chao @ 2013-05-14  3:56 UTC (permalink / raw)
  To: horms; +Cc: kexec

Error messages are mixed stderr with stdout when we use die() along with
printf(). So use die() to keep error out consistent.

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;
-- 
1.8.2.1


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-14  4:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-05-14  4:35 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox