Crinit -- Configurable Rootfs Init
|
Implementation of functions related to IO redirection. More...
#include "ioredir.h"
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "common.h"
#include "confconv.h"
#include "logio.h"
Functions | |
void | crinitDestroyIoRedir (crinitIoRedir_t *ior) |
int | crinitIoRedirCpy (crinitIoRedir_t *dest, const crinitIoRedir_t *src) |
Implementation of functions related to IO redirection.
void crinitDestroyIoRedir | ( | crinitIoRedir_t * | ior | ) |
Frees memory associated with an initialized instance of crinitIoRedir_t.
ior | The instance whose associated memory shall be freed. |
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().
dest | The crinitIoRedir_t instance to initialize. |
src | The source/original instance to copy data from. |