summaryrefslogtreecommitdiffstats
path: root/discover/platform-powerpc.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-03-10 10:40:46 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-03-14 15:14:26 +0800
commit63e8f10b50712894a30ece9618bafa38734e51e4 (patch)
treeb01858000e8a7fa1bf8b970767ef10d82e666e28 /discover/platform-powerpc.c
parent90d16d056b4d7c6b8e2afb6b3406babd38f6c9e5 (diff)
downloadpetitboot-63e8f10b50712894a30ece9618bafa38734e51e4.zip
petitboot-63e8f10b50712894a30ece9618bafa38734e51e4.tar.gz
discover: Add debug output to sysparams parsing
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r--discover/platform-powerpc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index 4eb2805..d1f0575 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -540,16 +540,24 @@ static int read_bootdev_sysparam(const char *name, uint8_t *val)
strcat(path, name);
fd = open(path, O_RDONLY);
- if (fd < 0)
+ if (fd < 0) {
+ pb_debug("powerpc: can't access sysparam %s\n",
+ name);
return -1;
+ }
rc = read(fd, buf, sizeof(buf));
close(fd);
/* bootdev definitions should only be one byte in size */
- if (rc != 1)
+ if (rc != 1) {
+ pb_debug("powerpc: sysparam %s read returned %d\n",
+ name, rc);
return -1;
+ }
+
+ pb_debug("powerpc: sysparam %s: 0x%02x\n", name, buf[0]);
switch (buf[0]) {
default:
OpenPOWER on IntegriCloud