Crinit -- Configurable Rootfs Init
ioredir.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: MIT
6 #ifndef __IOREDIR_H__
7 #define __IOREDIR_H__
8 
9 #include "confparse.h"
10 
14 typedef struct crinitIoRedir_t {
15  int newFd;
16  int oldFd;
17  char *path;
19  int oflags;
21  mode_t mode;
22  bool fifo;
24 
31 
45 int crinitIoRedirCpy(crinitIoRedir_t *dest, const crinitIoRedir_t *src);
46 
47 #endif /* __IOREDIR_H__ */
Header related to the Config Parser.
int crinitIoRedirCpy(crinitIoRedir_t *dest, const crinitIoRedir_t *src)
Definition: ioredir.c:22
struct crinitIoRedir_t crinitIoRedir_t
void crinitDestroyIoRedir(crinitIoRedir_t *ior)
Definition: ioredir.c:18
Definition: ioredir.h:14
int oldFd
The file descriptor to redirect to, called 'oldFd' equivalent to the man page for dup2()
Definition: ioredir.h:16
int newFd
The file descriptor to redirect, called 'newFd' equivalent to the man page for dup2()
Definition: ioredir.h:15
bool fifo
If true, the target at crinitIoRedir_t::path is treated as a FIFO special file (named pipe).
Definition: ioredir.h:22
int oflags
Definition: ioredir.h:19
char * path
Definition: ioredir.h:17
mode_t mode
The value to use as mode in the call to open if crinitIoRedir_t::path is used, for example 0644.
Definition: ioredir.h:21