diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-11-07 09:31:00 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-11-07 09:31:00 +0000 |
commit | 226949879e3ed5578d678c817a955bd38597eddb (patch) | |
tree | dbff96a77e5699462a5396f1cf151bf53b8208db /tools/bccmd.c | |
parent | 4c230395b79375ac7448ac4a60603b4c46b66386 (diff) |
Fix the memory types command
Diffstat (limited to 'tools/bccmd.c')
-rw-r--r-- | tools/bccmd.c | 10 |
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[] = { |