Split the `kernel_service.c` into multiple subcommand files, each file would register with the main `kernel` cmd based on the dependencies in Kconfig/CMakeLists.txt. This greatly reduces the number of precompiler directives. Signed-off-by: Yong Cong Sin <ycsin@meta.com> Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
23 lines
469 B
C
23 lines
469 B
C
/*
|
|
* Copyright (c) 2018 Nordic Semiconductor ASA
|
|
* Copyright (c) 2016 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "kernel_shell.h"
|
|
|
|
#include <zephyr/version.h>
|
|
|
|
static int cmd_kernel_version(const struct shell *sh,
|
|
size_t argc, char **argv)
|
|
{
|
|
ARG_UNUSED(argc);
|
|
ARG_UNUSED(argv);
|
|
|
|
shell_print(sh, "Zephyr version %s", KERNEL_VERSION_STRING);
|
|
return 0;
|
|
}
|
|
|
|
KERNEL_CMD_ADD(version, NULL, "Kernel version.", cmd_kernel_version);
|