Crinit -- Configurable Rootfs Init
rtimcmd.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: MIT
6 #ifndef __RTIMCMD_H__
7 #define __RTIMCMD_H__
8 
9 #include "rtimopmap.h"
10 #include "taskdb.h"
11 
15 #define CRINIT_RTIMCMD_SHDN_THREAD_STACK_SIZE (PTHREAD_STACK_MIN + 112 * 1024)
16 
17 #define CRINIT_RTIMCMD_RES_OK "RES_OK"
18 #define CRINIT_RTIMCMD_RES_ERR "RES_ERR"
19 
23 typedef struct crinitRtimCmd_t {
25  size_t argc;
26  char **args;
28 
42 int crinitBuildRtimCmd(crinitRtimCmd_t *c, crinitRtimOp_t op, size_t argc, ...);
53 
69 int crinitParseRtimCmd(crinitRtimCmd_t *out, const char *cmdStr);
82 int crinitRtimCmdToMsgStr(char **out, size_t *outLen, const crinitRtimCmd_t *cmd);
95 
96 #endif /* __RTIMCMD_H__ */
int crinitBuildRtimCmd(crinitRtimCmd_t *c, crinitRtimOp_t op, size_t argc,...)
Definition: rtimcmd.c:438
int crinitDestroyRtimCmd(crinitRtimCmd_t *c)
Definition: rtimcmd.c:529
int crinitExecRtimCmd(crinitTaskDB_t *ctx, crinitRtimCmd_t *res, const crinitRtimCmd_t *cmd)
Definition: rtimcmd.c:340
int crinitRtimCmdToMsgStr(char **out, size_t *outLen, const crinitRtimCmd_t *cmd)
Definition: rtimcmd.c:308
int crinitParseRtimCmd(crinitRtimCmd_t *out, const char *cmdStr)
Definition: rtimcmd.c:239
struct crinitRtimCmd_t crinitRtimCmd_t
Header defining the runtime commands available through the notification/service interface.
crinitRtimOp_t
Definition: rtimopmap.h:31
Definition: rtimcmd.h:23
crinitRtimOp_t op
The command or response opcode (see rtimopmap.h).
Definition: rtimcmd.h:24
char ** args
String array of arguments.
Definition: rtimcmd.h:26
size_t argc
The number of arguments.
Definition: rtimcmd.h:25
Definition: taskdb.h:21
Header defining the central Task Data Structure and related types/functions.