Crinit -- Configurable Rootfs Init
|
Implementation of functions related to the runtime command opcode map. More...
Macros | |
#define | CRINIT_RTIMOPMAP_ELEMENTS (sizeof(crinitRtimOps) / sizeof(crinitRtimOpMap_t)) |
Functions | |
static size_t | crinitDelimitedStrlen (const char *str) |
void | crinitRtimOpMapDebugPrintAll (void) |
int | crinitRtimOpGetByOpStr (crinitRtimOp_t *out, const char *opStr) |
int | crinitOpStrGetByRtimOp (const char **out, crinitRtimOp_t opCode) |
Variables | |
const crinitRtimOpMap_t | crinitRtimOps [] = {crinitGenOpMap(crinitGenOpStruct)} |
Implementation of functions related to the runtime command opcode map.
#define CRINIT_RTIMOPMAP_ELEMENTS (sizeof(crinitRtimOps) / sizeof(crinitRtimOpMap_t)) |
The number of elements in the generated map.
|
inlinestatic |
Gives the length of a string, delimited either by terminating zero or CRINIT_RTIMCMD_ARGDELIM.
str | The string. Must be at least one of: null-terminated CRINIT_RTIMCMD_ARGDELIM-terminated. |
int crinitOpStrGetByRtimOp | ( | const char ** | out, |
crinitRtimOp_t | opCode | ||
) |
Given an crinitRtimOp_t opcode, obtain its string representation.
The returned point points to static memory that shall not be changed.
out | Return pointer for the string representation. |
opCode | The opcode. |
int crinitRtimOpGetByOpStr | ( | crinitRtimOp_t * | out, |
const char * | opStr | ||
) |
Given its string representation, find the correct opcode.
out | Return pointer for the opcode. |
opStr | The string representaiton. |
void crinitRtimOpMapDebugPrintAll | ( | void | ) |
List available opcodes.
Will print the full list of available opcodes in their string representation and the corresponding numerical opcode. Output will only be generated if global option DEBUG
is true
as it uses crinitDbgInfoPrint().
const crinitRtimOpMap_t crinitRtimOps[] = {crinitGenOpMap(crinitGenOpStruct)} |
The string/opcode map for all opcodes, initialized in rtimopmap.c.