summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2015-11-20 12:31:54 -0500
committerSimon Horman <horms@verge.net.au>2015-11-24 16:03:16 +0900
commit4580c372000b469c4292e548c806dfe5922e97d1 (patch)
treed4d29fc39011b89bcb57676ad8d61f95c8b886ee
parent68262155d8c661586b809bc5301a7dff1c378137 (diff)
kexec/fs2dt: check for /chosen/stdout-path first
Check /chosen/stdout-path first, as linux,stdout-path is deprecated. I don't know how the ppc64:my_debug thing works, but on arm the warning "Unable to find /proc/device-tree//chosen/linux,stdout-path, printing from purgatory is diabled" is output when loading a kexec kernel. This patch at least suppresses that when /chosen/stdout-path exists, and maybe it even enables printing from purgatory? Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/fs2dt.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index affee57..b3c209b 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -656,12 +656,16 @@ static void putnode(void)
* code can print 'I'm in purgatory' message. Currently only
* pseries/hvcterminal is supported.
*/
- snprintf(filename, MAXPATH, "%slinux,stdout-path", pathname);
+ snprintf(filename, MAXPATH, "%sstdout-path", pathname);
fd = open(filename, O_RDONLY);
if (fd == -1) {
- printf("Unable to find %s, printing from purgatory is disabled\n",
- filename);
- goto no_debug;
+ snprintf(filename, MAXPATH, "%slinux,stdout-path", pathname);
+ fd = open(filename, O_RDONLY);
+ if (fd == -1) {
+ printf("Unable to find %s[linux,]stdout-path, printing from purgatory is disabled\n",
+ pathname);
+ goto no_debug;
+ }
}
if (fstat(fd, &statbuf)) {
printf("Unable to stat %s, printing from purgatory is disabled\n",