Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
crinit.c File Reference

(/usr/bin/git 2025-03-11, commit: 9ee3a45)

Implementation of the Crinit main program. More...

#include <getopt.h>
#include <linux/prctl.h>
#include <stdlib.h>
#include <sys/prctl.h>
#include <unistd.h>
#include "common.h"
#include "globopt.h"
#include "kcmdline.h"
#include "logio.h"
#include "minsetup.h"
#include "notiserv.h"
#include "optfeat.h"
#include "procdip.h"
#include "rtimopmap.h"
#include "version.h"
Include dependency graph for crinit.c:

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.

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.