summaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli.c')
-rw-r--r--cli.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index 308092d..8c65830 100644
--- a/cli.c
+++ b/cli.c
@@ -1537,7 +1537,14 @@ int main(int argc, char **argv) {
if ((start >= ranges[i].start)&&(start <= ranges[i].end)) break;
// register access in plain mode
- if (ranges[i].start != ranges[i].end) ++mode;
+ if (ranges[i].start != ranges[i].end) {
+ pcilib_register_bank_t regbank = pcilib_find_bank_by_addr(handle, ranges[i].bank);
+ if (regbank == PCILIB_REGISTER_BANK_INVALID) Error("Configuration error: register bank specified in the address range is not found");
+
+ bank = model_info->banks[regbank].name;
+ start += ranges[i].addr_shift;
+ ++mode;
+ }
}
} else {
if (pcilib_find_register(handle, bank, addr) == PCILIB_REGISTER_INVALID) {