Utils for fw shell.
More...
#include <basics.h>
#include <memory.h>
#include <graphics.h>
#include <keyboard.h>
#include <heap.h>
#include <stddef.h>
#include <strings.h>
#include <stdint.h>
#include <flanterm/flanterm.h>
#include <filesystems/fwrfs.h>
#include <fdlfcn.h>
#include <commands/commands.h>
#include <stream.h>
Go to the source code of this file.
|
|
typedef struct command_list_entry | command_list_entry |
| typedef int(* | cmd_func_t) (int argc, char **argv) |
| | Wrapper to store properly the function commands list.
|
|
| enum | op_t { OP_NONE = 0
, OP_AND
, OP_OR
} |
| | operator types between commands More...
|
Utils for fw shell.
- Author
- Pradosh (prado.nosp@m.shga.nosp@m.me@gm.nosp@m.ail..nosp@m.com) & GAMINGNOOBdev(https://github.com/GAMINGNOOBdev)
- Version
- 0.1
- Date
- 2025-01-14
- Copyright
- Copyright (c) Pradosh 2025
Definition in file sh_util.h.
◆ BUFFER_SIZE
◆ MAX_ARGV
◆ MAX_COMMAND_LINE
| #define MAX_COMMAND_LINE 1024 |
◆ MAX_SUBCOMMANDS
| #define MAX_SUBCOMMANDS 64 |
◆ cmd_func_t
| typedef int(* cmd_func_t) (int argc, char **argv) |
Wrapper to store properly the function commands list.
Definition at line 62 of file sh_util.h.
◆ op_t
operator types between commands
Definition at line 77 of file sh_util.h.
◆ dispose_command_list()
Dispose the command list.
- Parameters
-
| lst | Pointer to command list object |
◆ execute()
| void execute |
( |
const char * | buffer, |
|
|
int | argc, |
|
|
char ** | argv ) |
Executes the command passed to it.
- Parameters
-
◆ init_command_list()
Initialize the command list.
- Parameters
-
| lst | Pointer to command list object |
◆ push_command_to_list()
| void push_command_to_list |
( |
command_list * | lst, |
|
|
const char * | value, |
|
|
size_t | length ) |
Push a value to the command list.
- Parameters
-
| lst | Pointer to command list object |
| value | Command string (will be copied to a new pointer) |
| length | Command string length |
◆ user_main()
| void user_main |
( |
char * | buffer | ) |
|
Function for adding or removing users.
- Parameters
-
| argument_count | |
| argument_values | |
◆ current_user
Name of the current user.
Definition at line 92 of file sh_util.h.