> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
 22:28:54  up 3 days 21:29,  2 users,  load average: 0.64, 1.01, 0.91
This commit is contained in:
tracer-ysyx 2024-01-11 22:28:54 +08:00 committed by xinyangli
parent 32f5ddfed0
commit 3fd601183a

View file

@ -200,13 +200,20 @@ wrong_usage:
static int cmd_info(char *args) {
char *arg = strtok(NULL, " ");
int i;
if (arg == NULL) {
goto wrong_usage;
return 0;
}
for (i = 0; i < NR_CMD; i++) {
if (strcmp(arg, cmd_info_table[i].name) == 0) {
cmd_info_table[i].handler(args);
return 0;
}
}
wrong_usage:
printf("Invalid argument for command info: %s\n", args);
printf("Usage: info [r | w]\n");
return 0;
}