Skip to content

Commit 9f3003c

Browse files
committedJul 8, 2024·
Rename hart_number to hart_count
1 parent 0d95894 commit 9f3003c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎main.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ static void handle_options(int argc,
447447
char **dtb_file,
448448
char **initrd_file,
449449
char **disk_file,
450-
int *hart_number)
450+
int *hart_count)
451451
{
452452
*kernel_file = *dtb_file = *initrd_file = *disk_file = NULL;
453453

@@ -474,7 +474,7 @@ static void handle_options(int argc,
474474
*disk_file = optarg;
475475
break;
476476
case 'c':
477-
*hart_number = atoi(optarg);
477+
*hart_count = atoi(optarg);
478478
break;
479479
case 'h':
480480
usage(argv[0]);
@@ -516,9 +516,9 @@ static int semu_start(int argc, char **argv)
516516
char *dtb_file;
517517
char *initrd_file;
518518
char *disk_file;
519-
int hart_number = 1;
519+
int hart_count = 1;
520520
handle_options(argc, argv, &kernel_file, &dtb_file, &initrd_file,
521-
&disk_file, &hart_number);
521+
&disk_file, &hart_count);
522522

523523
/* Initialize the emulator */
524524
emu_state_t emu;
@@ -560,7 +560,7 @@ static int semu_start(int argc, char **argv)
560560

561561
/* Set up RISC-V hart */
562562
vm_t vm;
563-
vm.n_hart = hart_number;
563+
vm.n_hart = hart_count;
564564
vm.hart = malloc(sizeof(hart_t *) * vm.n_hart);
565565
for (uint32_t i = 0; i < vm.n_hart; i++) {
566566
hart_t *newhart = malloc(sizeof(hart_t));

0 commit comments

Comments
 (0)
Please sign in to comment.