aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-05-22 15:30:14 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-06-01 17:25:04 +1000
commit23b6f335234ddea1292d85f1860fb5fc0d9a62c0 (patch)
treea30d6d4542ba9cbc46bf5cd8da6d4643c3a65c60 /external
parentb2fb681ef6ef92e9efb0e6ba47dedf3cbb2ad26f (diff)
downloadskiboot-23b6f335234ddea1292d85f1860fb5fc0d9a62c0.zip
skiboot-23b6f335234ddea1292d85f1860fb5fc0d9a62c0.tar.gz
skiboot-23b6f335234ddea1292d85f1860fb5fc0d9a62c0.tar.bz2
external/pflash: Report if a flash partition is ECC protected
Currently pflash doesn't display if a flash partition contains ECC bits or not when dumping the flash layout. libffs has all this information it's just that pflash doesn't relay it. Trivial change to add to the information pflash prints about each partition Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/pflash/pflash.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c
index 6a6f284..88f3110 100644
--- a/external/pflash/pflash.c
+++ b/external/pflash/pflash.c
@@ -100,9 +100,10 @@ static void print_flash_info(void)
for (i = 0;; i++) {
uint32_t start, size, act, end;
+ bool ecc;
char *name;
- rc = ffs_part_info(ffsh, i, &name, &start, &size, &act, NULL);
+ rc = ffs_part_info(ffsh, i, &name, &start, &size, &act, &ecc);
if (rc == FFS_ERR_PART_NOT_FOUND)
break;
if (rc) {
@@ -110,8 +111,9 @@ static void print_flash_info(void)
break;
}
end = start + size;
- printf("ID=%02d %15s %08x..%08x (actual=%08x)\n",
- i, name, start, end, act);
+ printf("ID=%02d %15s %08x..%08x (actual=%08x) %s\n",
+ i, name, start, end, act, ecc ? "[ECC]" : "");
+
free(name);
}
}