[Pdbg] [PATCH 2/5] main: Use the correct length of linux cpu list

Amitay Isaacs amitay at ozlabs.org
Thu Aug 9 15:19:24 AEST 2018


Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 src/main.c | 4 ++--
 1 file 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)
-- 
2.17.1



More information about the Pdbg mailing list