Crinit -- Configurable Rootfs Init
ioredir.h File Reference

(2023-08-02, commit: 9434b31)

Header related to IO redirection types and functions. More...

#include "confparse.h"
Include dependency graph for ioredir.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  crinitIoRedir_t
 

Typedefs

typedef struct crinitIoRedir_t crinitIoRedir_t
 

Functions

void crinitDestroyIoRedir (crinitIoRedir_t *ior)
 
int crinitIoRedirCpy (crinitIoRedir_t *dest, const crinitIoRedir_t *src)
 

Detailed Description

Header related to IO redirection types and functions.

Typedef Documentation

◆ crinitIoRedir_t

Type to store an IO redirection definition for a task.

Function Documentation

◆ crinitDestroyIoRedir()

void crinitDestroyIoRedir ( crinitIoRedir_t ior)

Frees memory associated with an initialized instance of crinitIoRedir_t.

Parameters
iorThe instance whose associated memory shall be freed.

◆ crinitIoRedirCpy()

int crinitIoRedirCpy ( crinitIoRedir_t dest,
const crinitIoRedir_t src 
)

Initializes an instance of crinitIoRedir_t from an already initialized other instance.

The resulting instance will contain equal values to the original. If the original instance contains dynamically allocated elements, equivalent memory will be allocated in the new instance and all contents copied.

The function may allocate memory inside the crinitIoRedir_t struct which must be freed using crinitDestroyIoRedir().

Parameters
destThe crinitIoRedir_t instance to initialize.
srcThe source/original instance to copy data from.
Returns
0 on success, -1 otherwise