[lib][console] rename some console command types to be prefixed with console_

Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_

The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func

Apologies if this breaks you but it should be pretty easy to fix.
This commit is contained in:
Travis Geiselbrecht
2020-07-25 15:59:58 -07:00
parent c629d762a3
commit 4edb93adde
51 changed files with 151 additions and 149 deletions

View File

@@ -32,7 +32,7 @@ static const uint8_t expected_ciphertext[] = {
0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a
};
static int aes_command(int argc, const cmd_args *argv)
static int aes_command(int argc, const console_cmd_args *argv)
{
AES_KEY aes_key;
uint8_t ciphertext[AES_BLOCK_SIZE];
@@ -60,7 +60,7 @@ static int aes_command(int argc, const cmd_args *argv)
return 0;
}
static int aes_bench(int argc, const cmd_args *argv)
static int aes_bench(int argc, const console_cmd_args *argv)
{
uint32_t c;
int i;

View File

@@ -30,10 +30,10 @@
#include <lk/console_cmd.h>
static int cmd_crc16(int argc, const cmd_args *argv);
static int cmd_crc32(int argc, const cmd_args *argv);
static int cmd_adler32(int argc, const cmd_args *argv);
static int cmd_cksum_bench(int argc, const cmd_args *argv);
static int cmd_crc16(int argc, const console_cmd_args *argv);
static int cmd_crc32(int argc, const console_cmd_args *argv);
static int cmd_adler32(int argc, const console_cmd_args *argv);
static int cmd_cksum_bench(int argc, const console_cmd_args *argv);
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 0
@@ -46,7 +46,7 @@ STATIC_COMMAND("bench_cksum", "benchmark the checksum routines", &cmd_cksum_benc
#endif
STATIC_COMMAND_END(crc);
static int cmd_crc16(int argc, const cmd_args *argv)
static int cmd_crc16(int argc, const console_cmd_args *argv)
{
if (argc < 3) {
printf("not enough arguments\n");
@@ -61,7 +61,7 @@ static int cmd_crc16(int argc, const cmd_args *argv)
return 0;
}
static int cmd_crc32(int argc, const cmd_args *argv)
static int cmd_crc32(int argc, const console_cmd_args *argv)
{
if (argc < 3) {
printf("not enough arguments\n");
@@ -76,7 +76,7 @@ static int cmd_crc32(int argc, const cmd_args *argv)
return 0;
}
static int cmd_adler32(int argc, const cmd_args *argv)
static int cmd_adler32(int argc, const console_cmd_args *argv)
{
if (argc < 3) {
printf("not enough arguments\n");
@@ -91,7 +91,7 @@ static int cmd_adler32(int argc, const cmd_args *argv)
return 0;
}
static int cmd_cksum_bench(int argc, const cmd_args *argv)
static int cmd_cksum_bench(int argc, const console_cmd_args *argv)
{
#define BUFSIZE 0x1000
#define ITER 16384

View File

@@ -28,7 +28,7 @@
#include <lwip/api.h>
#include <lwip/ip_addr.h>
static int net_cmd(int argc, const cmd_args *argv)
static int net_cmd(int argc, const console_cmd_args *argv)
{
if (argc < 2) {
printf("%s commands:\n", argv[0].str);