summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-11-07 09:31:00 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-11-07 09:31:00 +0000
commit226949879e3ed5578d678c817a955bd38597eddb (patch)
treedbff96a77e5699462a5396f1cf151bf53b8208db /tools
parent4c230395b79375ac7448ac4a60603b4c46b66386 (diff)
Fix the memory types command
Diffstat (limited to 'tools')
-rw-r--r--tools/bccmd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/bccmd.c b/tools/bccmd.c
index e41f08f5..902555e5 100644
--- a/tools/bccmd.c
+++ b/tools/bccmd.c
@@ -335,21 +335,21 @@ static int cmd_memtypes(int dd, int argc, char *argv[])
for (i = 0; i < 4; i++) {
memset(array, 0, sizeof(array));
- array[2] = stores[i] & 0xff;
- array[3] = stores[i] >> 8;
+ array[0] = stores[i] & 0xff;
+ array[1] = stores[i] >> 8;
err = csr_read_varid_complex(dd, seqnum++,
CSR_VARID_PS_MEMORY_TYPE, array, sizeof(array));
if (err < 0)
- break;
+ continue;
- type = array[4] + (array[5] << 8);
+ type = array[2] + (array[3] << 8);
printf("%s (0x%04x) = %s (%d)\n", storestostr(stores[i]),
stores[i], memorytostr(type), type);
}
- return err;
+ return 0;
}
static struct option pskey_options[] = {