zephyr/lib/posix/shell/posix_shell.h
Yong Cong Sin 45c554d082 posix: shell: introduce top level posix command
Added a top level `posix` shell command for other POSIX
commands. Currently only `uname` is supported.

New POSIX commands can be added by including the
`posix_shell.h` header and use the `POSIX_CMD_ADD` helper
macro.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-18 10:54:32 +01:00

16 lines
506 B
C

/*
* Copyright (c) 2024 Meta
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_LIB_POSIX_SHELL_POSIX_SHELL_H_
#define ZEPHYR_LIB_POSIX_SHELL_POSIX_SHELL_H_
#include <zephyr/shell/shell.h>
/* Add command to the set of POSIX subcommands, see `SHELL_SUBCMD_ADD` */
#define POSIX_CMD_ADD(_syntax, _subcmd, _help, _handler, _mand, _opt) \
SHELL_SUBCMD_ADD((posix), _syntax, _subcmd, _help, _handler, _mand, _opt);
#endif /* ZEPHYR_LIB_POSIX_SHELL_POSIX_SHELL_H_ */