[console] Use STATIC_COMMAND macro for all console command definitions

BUG=

Review URL: https://codereview.chromium.org/1348403002 .
This commit is contained in:
Gurjant Kalsi
2015-09-16 15:37:33 -07:00
parent 393b8f7698
commit a6c8b005db
16 changed files with 31 additions and 31 deletions

View File

@@ -250,7 +250,7 @@ out:
}
STATIC_COMMAND_START
{ "pci", "pci toolbox", &pci_cmd },
STATIC_COMMAND("pci", "pci toolbox", &pci_cmd)
STATIC_COMMAND_END(pcitests);
#endif

View File

@@ -350,7 +350,7 @@ out:
}
STATIC_COMMAND_START
{ "string", "memcpy tests", &string_tests },
STATIC_COMMAND("string", "memcpy tests", &string_tests)
STATIC_COMMAND_END(stringtests);
#endif

View File

@@ -202,7 +202,7 @@ static int cmd_dcc(int argc, const cmd_args *argv)
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 1
{ "dcc", "dcc stuff", &cmd_dcc }
STATIC_COMMAND("dcc", "dcc stuff", &cmd_dcc)
#endif
STATIC_COMMAND_END(dcc);

View File

@@ -94,7 +94,7 @@ static int cmd_gpio(int argc, const cmd_args *argv)
return 0;
}
STATIC_COMMAND_START
{ "gpio", "commands for manipulating system gpios", &cmd_gpio },
STATIC_COMMAND("gpio", "commands for manipulating system gpios", &cmd_gpio)
STATIC_COMMAND_END(gpio);
#endif

View File

@@ -153,7 +153,7 @@ usage:
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 1
{ "buildsig", "scan for and dump build signature", &cmd_buildsig },
STATIC_COMMAND("buildsig", "scan for and dump build signature", &cmd_buildsig)
#endif
STATIC_COMMAND_END(buildid);

View File

@@ -39,12 +39,12 @@ static int cmd_cksum_bench(int argc, const cmd_args *argv);
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 0
{ "crc16", "crc16", &cmd_crc16 },
{ "crc32", "crc32", &cmd_crc32 },
{ "adler32", "adler32", &cmd_adler32 },
STATIC_COMMAND("crc16", "crc16", &cmd_crc16)
STATIC_COMMAND("crc32", "crc32", &cmd_crc32)
STATIC_COMMAND("adler32", "adler32", &cmd_adler32)
#endif
#if LK_DEBUGLEVEL > 1
{ "bench_cksum", "benchmark the checksum routines", &cmd_cksum_bench },
STATIC_COMMAND("bench_cksum", "benchmark the checksum routines", &cmd_cksum_bench)
#endif
STATIC_COMMAND_END(crc);

View File

@@ -50,21 +50,21 @@ static int cmd_chain(int argc, const cmd_args *argv);
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 0
{ "dw", "display memory in words", &cmd_display_mem },
{ "dh", "display memory in halfwords", &cmd_display_mem },
{ "db", "display memory in bytes", &cmd_display_mem },
{ "mw", "modify word of memory", &cmd_modify_mem },
{ "mh", "modify halfword of memory", &cmd_modify_mem },
{ "mb", "modify byte of memory", &cmd_modify_mem },
{ "fw", "fill range of memory by word", &cmd_fill_mem },
{ "fh", "fill range of memory by halfword", &cmd_fill_mem },
{ "fb", "fill range of memory by byte", &cmd_fill_mem },
{ "mc", "copy a range of memory", &cmd_copy_mem },
STATIC_COMMAND("dw", "display memory in words", &cmd_display_mem)
STATIC_COMMAND("dh", "display memory in halfwords", &cmd_display_mem)
STATIC_COMMAND("db", "display memory in bytes", &cmd_display_mem)
STATIC_COMMAND("mw", "modify word of memory", &cmd_modify_mem)
STATIC_COMMAND("mh", "modify halfword of memory", &cmd_modify_mem)
STATIC_COMMAND("mb", "modify byte of memory", &cmd_modify_mem)
STATIC_COMMAND("fw", "fill range of memory by word", &cmd_fill_mem)
STATIC_COMMAND("fh", "fill range of memory by halfword", &cmd_fill_mem)
STATIC_COMMAND("fb", "fill range of memory by byte", &cmd_fill_mem)
STATIC_COMMAND("mc", "copy a range of memory", &cmd_copy_mem)
#endif
#if LK_DEBUGLEVEL > 1
{ "mtest", "simple memory test", &cmd_memtest },
STATIC_COMMAND("mtest", "simple memory test", &cmd_memtest)
#endif
{ "chain", "chain load another binary", &cmd_chain },
STATIC_COMMAND("chain", "chain load another binary", &cmd_chain)
STATIC_COMMAND_END(mem);
static int cmd_display_mem(int argc, const cmd_args *argv)

View File

@@ -106,7 +106,7 @@ out:
}
STATIC_COMMAND_START
{ "ffs", "ffs toolbox", &ffs_cmd },
STATIC_COMMAND("ffs", "ffs toolbox", &ffs_cmd)
STATIC_COMMAND_END(ffscommands);

View File

@@ -609,7 +609,7 @@ usage:
}
STATIC_COMMAND_START
{ "klog", "commands for manipulating klog", &cmd_klog },
STATIC_COMMAND("klog", "commands for manipulating klog", &cmd_klog)
STATIC_COMMAND_END(klog);
#endif // WITH_LIB_CONSOLE

View File

@@ -63,7 +63,7 @@ out:
}
STATIC_COMMAND_START
{ "net", "net toolbox", &net_cmd },
STATIC_COMMAND("net", "net toolbox", &net_cmd)
STATIC_COMMAND_END(net);
#endif

View File

@@ -927,7 +927,7 @@ usage:
}
STATIC_COMMAND_START
{ "ptable", "commands for manipulating the flash partition table", &cmd_ptable },
STATIC_COMMAND("ptable", "commands for manipulating the flash partition table", &cmd_ptable)
STATIC_COMMAND_END(ptable);
#endif // WITH_LIB_CONSOLE

View File

@@ -709,7 +709,7 @@ done:
}
STATIC_COMMAND_START
{ "sysparam", "commands for manipulating system parameters", &cmd_sysparam },
STATIC_COMMAND("sysparam", "commands for manipulating system parameters", &cmd_sysparam)
STATIC_COMMAND_END(sysparam);
#endif // WITH_LIB_CONSOLE

View File

@@ -66,7 +66,7 @@ static int cmd_version(int argc, const cmd_args *argv)
}
STATIC_COMMAND_START
{ "version", "print version", &cmd_version },
STATIC_COMMAND("version", "print version", &cmd_version)
STATIC_COMMAND_END(version);
#endif // WITH_LIB_CONSOLE

View File

@@ -278,7 +278,7 @@ void i2c_init(void)
static int cmd_i2c(int argc, const cmd_args *argv);
STATIC_COMMAND_START
{ "i2c", "i2c read/write commands", &cmd_i2c },
STATIC_COMMAND("i2c", "i2c read/write commands", &cmd_i2c)
STATIC_COMMAND_END(i2c);
static int cmd_i2c(int argc, const cmd_args *argv)

View File

@@ -57,8 +57,8 @@ static int cmd_poweroff(int argc, const cmd_args *argv)
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 1
{ "reboot", "soft reset", &cmd_reboot },
{ "poweroff", "powerdown", &cmd_poweroff },
STATIC_COMMAND("reboot", "soft reset", &cmd_reboot)
STATIC_COMMAND("poweroff", "powerdown", &cmd_poweroff)
#endif
STATIC_COMMAND_END(platform_power);

View File

@@ -277,7 +277,7 @@ static int cmd_zynq_gpio(int argc, const cmd_args *argv)
}
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 1
{ "zynq_gpio", "Dump Zynq GPIO registers", &cmd_zynq_gpio },
STATIC_COMMAND("zynq_gpio", "Dump Zynq GPIO registers", &cmd_zynq_gpio)
#endif
STATIC_COMMAND_END(zynq_gpio);