> 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
 10:30:40  up 1 day 10:46,  2 users,  load average: 0.78, 0.59, 0.50
This commit is contained in:
tracer-ysyx 2024-01-13 10:30:40 +08:00 committed by xinyangli
parent d0e2e99305
commit b51e58a20f

View file

@ -38,11 +38,11 @@ static int cmd_info(char *args);
static int cmd_info_r(char *args);
static int cmd_info_w(char *args);
static struct CMDTable {
static struct CommandTable {
const char *name;
const char *description;
int (*handler)(char *);
struct CMDTable *subcommand;
struct CommandTable *subcommand;
int nr_subcommand;
} cmd_info_table[] =
{
@ -231,7 +231,7 @@ wrong_usage:
return 0;
}
static int cmd_help_print(char *args, struct CMDTable *cur_cmd_table,
static int cmd_help_print(char *args, struct CommandTable *cur_cmd_table,
int cur_nr_cmd) {
int i;
char *arg = strtok(NULL, " ");
@ -271,7 +271,7 @@ static int cmd_help(char *args) {
printf("-- %s\n", cmd_table[i].description);
// Print available subcommands
for (int j = 0; j < cmd_table[i].nr_subcommand; j++) {
struct CMDTable *sub_cmd_table = cmd_table[i].subcommand;
struct CommandTable *sub_cmd_table = cmd_table[i].subcommand;
printf(" > %s -- %s\n", sub_cmd_table[j].name,
sub_cmd_table[j].description);
}