[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

@@ -27,10 +27,10 @@
#include <platform.h>
#include <stdio.h>
static int cmd_threads(int argc, const cmd_args *argv);
static int cmd_threadstats(int argc, const cmd_args *argv);
static int cmd_threadload(int argc, const cmd_args *argv);
static int cmd_kevlog(int argc, const cmd_args *argv);
static int cmd_threads(int argc, const console_cmd_args *argv);
static int cmd_threadstats(int argc, const console_cmd_args *argv);
static int cmd_threadload(int argc, const console_cmd_args *argv);
static int cmd_kevlog(int argc, const console_cmd_args *argv);
STATIC_COMMAND_START
#if LK_DEBUGLEVEL > 1
@@ -46,7 +46,7 @@ STATIC_COMMAND_MASKED("kevlog", "dump kernel event log", &cmd_kevlog, CMD_AVAIL_
STATIC_COMMAND_END(kernel);
#if LK_DEBUGLEVEL > 1
static int cmd_threads(int argc, const cmd_args *argv) {
static int cmd_threads(int argc, const console_cmd_args *argv) {
printf("thread list:\n");
dump_all_threads();
@@ -55,7 +55,7 @@ static int cmd_threads(int argc, const cmd_args *argv) {
#endif
#if THREAD_STATS
static int cmd_threadstats(int argc, const cmd_args *argv) {
static int cmd_threadstats(int argc, const console_cmd_args *argv) {
for (uint i = 0; i < SMP_MAX_CPUS; i++) {
if (!mp_is_cpu_active(i))
continue;
@@ -127,7 +127,7 @@ static enum handler_return threadload(struct timer *t, lk_time_t now, void *arg)
return INT_NO_RESCHEDULE;
}
static int cmd_threadload(int argc, const cmd_args *argv) {
static int cmd_threadload(int argc, const console_cmd_args *argv) {
static bool showthreadload = false;
static timer_t tltimer;
@@ -201,7 +201,7 @@ void kernel_evlog_dump(void) {
kernel_evlog_enable = true;
}
static int cmd_kevlog(int argc, const cmd_args *argv) {
static int cmd_kevlog(int argc, const console_cmd_args *argv) {
printf("kernel event log:\n");
kernel_evlog_dump();

View File

@@ -251,14 +251,14 @@ status_t novm_alloc_specific_pages(void *address, size_t pages) {
#if LK_DEBUGLEVEL > 1
static int cmd_novm(int argc, const cmd_args *argv);
static int cmd_novm(int argc, const console_cmd_args *argv);
static void novm_dump(void);
STATIC_COMMAND_START
STATIC_COMMAND("novm", "page allocator (for devices without VM support) debug commands", &cmd_novm)
STATIC_COMMAND_END(novm);
static int cmd_novm(int argc, const cmd_args *argv) {
static int cmd_novm(int argc, const console_cmd_args *argv) {
if (argc < 2) {
notenoughargs:
printf("not enough arguments\n");

View File

@@ -396,7 +396,7 @@ static void dump_arena(const pmm_arena_t *arena, bool dump_pages) {
}
}
static int cmd_pmm(int argc, const cmd_args *argv) {
static int cmd_pmm(int argc, const console_cmd_args *argv) {
if (argc < 2) {
notenoughargs:
printf("not enough arguments\n");

View File

@@ -129,7 +129,7 @@ vmm_aspace_t *vaddr_to_aspace(void *ptr) {
}
}
static int cmd_vm(int argc, const cmd_args *argv) {
static int cmd_vm(int argc, const console_cmd_args *argv) {
if (argc < 2) {
notenoughargs:
printf("not enough arguments\n");

View File

@@ -712,7 +712,7 @@ static void dump_aspace(const vmm_aspace_t *a) {
}
}
static int cmd_vmm(int argc, const cmd_args *argv) {
static int cmd_vmm(int argc, const console_cmd_args *argv) {
if (argc < 2) {
notenoughargs:
printf("not enough arguments\n");