Crinit -- Configurable Rootfs Init
optfeat.h File Reference

(2023-08-28, commit: b2c4d42)

Header related to optional behavior dependent on available system features. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum crinitHookType_t crinitHookType_t
 

Enumerations

enum  crinitHookType_t { INIT , EXIT , START , TASK_ADDED }
 

Functions

int crinitFeatureHook (const char *sysFeatName, crinitHookType_t type, void *data)
 

Detailed Description

Header related to optional behavior dependent on available system features.

Typedef Documentation

◆ crinitHookType_t

Hook types.

Enumeration Type Documentation

◆ crinitHookType_t

Hook types.

Enumerator
INIT 

Initialization of the optional feature (eg. setup database).

EXIT 

Cleanup of the optional feature (remove temporary files).

START 

The optional feature is triggered by a specific event.

TASK_ADDED 

Hook handles the addition of a new task.

Function Documentation

◆ crinitFeatureHook()

int crinitFeatureHook ( const char *  sysFeatName,
crinitHookType_t  type,
void *  data 
)

Hook to be called whenever a new feature is provided by a task.

Meant to be used to let Crinit change its own behavior whenever a relevant (optional or delayed) feature needed for some special functionality gets provided.

Currently only handles activation of syslog functionality if series config option USE_SYSLOG is true and a task provides syslog.

Parameters
sysFeatNameName of the newly-provided feature.
typeType of the invoked hook.
dataHook payload.
Returns
0 on success, -1 otherwise