Skip to content

Commit

Permalink
Change argument for smp option setting
Browse files Browse the repository at this point in the history
Use -c for short representation of SMP option, and Leave --smp for
long representation.
  • Loading branch information
ranvd committed Jun 24, 2024
1 parent bff923d commit f4023b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ext4.img:

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

build-image:
scripts/build-image.sh
Expand Down
6 changes: 3 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ static void handle_options(int argc,
struct option opts[] = {
{"kernel", 1, NULL, 'k'}, {"dtb", 1, NULL, 'b'},
{"initrd", 1, NULL, 'i'}, {"disk", 1, NULL, 'd'},
{"smp", 1, NULL, 's'}, {"help", 0, NULL, 'h'},
{"smp", 1, NULL, 'c'}, {"help", 0, NULL, 'h'},
};

int c;
while ((c = getopt_long(argc, argv, "k:b:i:d:h", opts, &optidx)) != -1) {
while ((c = getopt_long(argc, argv, "k:b:i:d:c:h", opts, &optidx)) != -1) {
switch (c) {
case 'k':
*kernel_file = optarg;
Expand All @@ -473,7 +473,7 @@ static void handle_options(int argc,
case 'd':
*disk_file = optarg;
break;
case 's':
case 'c':
*hart_number = atoi(optarg);
break;
case 'h':
Expand Down

0 comments on commit f4023b1

Please sign in to comment.