summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@ozlabs.org>2018-08-09 15:19:24 +1000
committerAlistair Popple <alistair@popple.id.au>2018-08-13 15:37:53 +1000
commit467bab53eab61517f95cf05ce0e44da0ce4c558a (patch)
tree3bf8c8b677a9b36c2e56f5b4dd0a0ed0abb2335f
parent2ae4b4e991a43daa50616cdb6b236a53ad450bb3 (diff)
downloadpdbg-467bab53eab61517f95cf05ce0e44da0ce4c558a.tar.gz
pdbg-467bab53eab61517f95cf05ce0e44da0ce4c558a.zip
main: Use the correct length of linux cpu list
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Reviewed-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 48956bb..cfb01a8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -391,7 +391,7 @@ static bool parse_options(int argc, char *argv[])
break;
case 'l':
- if (!parse_list(optarg, MAX_PROCESSORS, l_list, &l_count)) {
+ if (!parse_list(optarg, MAX_LINUX_CPUS, l_list, &l_count)) {
fprintf(stderr, "Failed to parse '-l %s'\n", optarg);
opt_error = true;
}
@@ -491,7 +491,7 @@ static bool parse_options(int argc, char *argv[])
if (l_count) {
int pir = -1, i, chip, core, thread;
- for (i = 0; i < MAX_PROCESSORS; i++) {
+ for (i = 0; i < MAX_LINUX_CPUS; i++) {
if (l_list[i] == 1) {
pir = get_pir(i);
if (pir < 0)
OpenPOWER on IntegriCloud