]> git.ozlabs.org Git - petitboot/blobdiff - discover/platform-powerpc.c
discover: Add debug output to sysparams parsing
[petitboot] / discover / platform-powerpc.c
index 4eb28057c9fb6c7513a05c315cda8599c71cdc7c..d1f0575d5efb12863eb0a4a59ed116a50e990657 100644 (file)
@@ -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: