Crinit -- Configurable Rootfs Init
crinit.c File Reference

(2023-08-28, commit: 7e6673e)

Implementation of the Crinit main program. More...

#include <stdlib.h>
#include <unistd.h>
#include "common.h"
#include "globopt.h"
#include "logio.h"
#include "minsetup.h"
#include "notiserv.h"
#include "procdip.h"
#include "rtimcmd.h"
#include "version.h"
Include dependency graph for crinit.c:

Macros

#define CRINIT_DEFAULT_CONFIG_SERIES   "/etc/crinit/default.series"
 

Functions

static void crinitPrintVersion (void)
 
static void crinitPrintUsage (const char *basename)
 
static void crinitTaskPrint (const crinitTask_t *t)
 
int main (int argc, char *argv[])
 

Detailed Description

Implementation of the Crinit main program.

Macro Definition Documentation

◆ CRINIT_DEFAULT_CONFIG_SERIES

#define CRINIT_DEFAULT_CONFIG_SERIES   "/etc/crinit/default.series"

The default series file. Used if nothing is specified on command line.

Function Documentation

◆ crinitPrintUsage()

static void crinitPrintUsage ( const char *  basename)
static

Print usage information for Crinit to stderr.

Includes version message via crinitPrintVersion().

Parameters
basenameThe name of this executable, according to argv[0].

◆ crinitPrintVersion()

static void crinitPrintVersion ( void  )
static

Prints a message indicating Crinit's version to stderr.

◆ crinitTaskPrint()

static void crinitTaskPrint ( const crinitTask_t t)
static

Print out the contents of an crinitTask_t structure in a readable format using crinitDbgInfoPrint().

Parameters
tThe task to be printed.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Main function of crinit.

Will perform minimal system setup, fork from PID 1 (which remains as a zombie reaper process), construct a TaskDB from the given configuration and then spawn tasks as they are ready.