Skip to content

Commit f4023b1

Browse files
committed
Change argument for smp option setting
Use -c for short representation of SMP option, and Leave --smp for long representation.
1 parent bff923d commit f4023b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ext4.img:
8989

9090
check: $(BIN) minimal.dtb $(KERNEL_DATA) $(INITRD_DATA) $(DISKIMG_FILE)
9191
@$(call notice, Ready to launch Linux kernel. Please be patient.)
92-
$(Q)./$(BIN) -k $(KERNEL_DATA) --smp $(SMP) -b minimal.dtb -i $(INITRD_DATA) $(OPTS)
92+
$(Q)./$(BIN) -k $(KERNEL_DATA) -c $(SMP) -b minimal.dtb -i $(INITRD_DATA) $(OPTS)
9393

9494
build-image:
9595
scripts/build-image.sh

main.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,11 @@ static void handle_options(int argc,
455455
struct option opts[] = {
456456
{"kernel", 1, NULL, 'k'}, {"dtb", 1, NULL, 'b'},
457457
{"initrd", 1, NULL, 'i'}, {"disk", 1, NULL, 'd'},
458-
{"smp", 1, NULL, 's'}, {"help", 0, NULL, 'h'},
458+
{"smp", 1, NULL, 'c'}, {"help", 0, NULL, 'h'},
459459
};
460460

461461
int c;
462-
while ((c = getopt_long(argc, argv, "k:b:i:d:h", opts, &optidx)) != -1) {
462+
while ((c = getopt_long(argc, argv, "k:b:i:d:c:h", opts, &optidx)) != -1) {
463463
switch (c) {
464464
case 'k':
465465
*kernel_file = optarg;
@@ -473,7 +473,7 @@ static void handle_options(int argc,
473473
case 'd':
474474
*disk_file = optarg;
475475
break;
476-
case 's':
476+
case 'c':
477477
*hart_number = atoi(optarg);
478478
break;
479479
case 'h':

0 commit comments

Comments
 (0)