Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
rtimopmap.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
6#ifndef __RTIMOPMAP_H__
7#define __RTIMOPMAP_H__
8
9#define CRINIT_RTIMCMD_ARGDELIM '\n'
10
14#define crinitGenOpMap(f) \
15 f(ADDTASK) f(ADDSERIES) f(ENABLE) f(DISABLE) f(STOP) f(KILL) f(RESTART) f(NOTIFY) f(STATUS) f(TASKLIST) \
16 f(SHUTDOWN) f(GETVER)
22#define crinitGenOpEnum(x) CRINIT_RTIMCMD_C_##x, CRINIT_RTIMCMD_R_##x,
26#define crinitGenOpStruct(x) {CRINIT_RTIMCMD_C_##x, "C_" #x}, {CRINIT_RTIMCMD_R_##x, "R_" #x},
27
32
40
44extern const crinitRtimOpMap_t crinitRtimOps[];
45
54int crinitRtimOpGetByOpStr(crinitRtimOp_t *out, const char *opStr);
65int crinitOpStrGetByRtimOp(const char **out, crinitRtimOp_t opCode);
73
74#endif /* __RTIMOPMAP_H__ */
int crinitOpStrGetByRtimOp(const char **out, crinitRtimOp_t opCode)
Definition rtimopmap.c:51
#define crinitGenOpMap(f)
Definition rtimopmap.h:14
const crinitRtimOpMap_t crinitRtimOps[]
Definition rtimopmap.c:13
#define crinitGenOpEnum(x)
Definition rtimopmap.h:22
crinitRtimOp_t
Definition rtimopmap.h:31
int crinitRtimOpGetByOpStr(crinitRtimOp_t *out, const char *opStr)
Definition rtimopmap.c:34
void crinitRtimOpMapDebugPrintAll(void)
Definition rtimopmap.c:27
Definition rtimopmap.h:36
const char * opStr
equivalent string representation
Definition rtimopmap.h:38
crinitRtimOp_t opCode
opcode
Definition rtimopmap.h:37