Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
minsetup.h File Reference

(/usr/bin/git)

Header related to minimal early system setup. More...

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

Go to the source code of this file.

Functions

int crinitMountDevtmpfs (void)
 
int crinitSetupSystemFs (void)
 
int crinitForkZombieReaper (void)
 

Detailed Description

Header related to minimal early system setup.

Function Documentation

◆ crinitForkZombieReaper()

int crinitForkZombieReaper ( void  )

Forks the calling process, parent will enter a wait-loop, child will return.

Meant to be used during early startup if the calling process is PID 1. After the call, PID 1 will be in a permanent wait-loop to take care of orphaned processes. The new process will return from the funtion and go on.

Returns
-1 if fork() fails, 0 on success in the child process, parent process will never return

◆ crinitMountDevtmpfs()

int crinitMountDevtmpfs ( void  )

Sets up devtmpfs

Meant to be used during early startup, so that necessary dev interfaces are available. For kmsg logging the devtmpfs needs to be very early available, therefore it is separated from crinitSetupSystemFs().

Returns
0 on success, -1 on error

◆ crinitSetupSystemFs()

int crinitSetupSystemFs ( void  )

Sets up devpts, sysfs, procfs, and a tmpfs on /run

Meant to be used during early startup, so that necessary system interfaces are available.

Returns
0 on success, -1 on error