AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
kargs.h File Reference

Go to the source code of this file.

Functions

int kargs_parse (const char *_cmdline)
 Splits the kernel's command line into arguments, at boot.
int kargs_get (const char *key, const char **value)
 Looks up an argument of the kernel's command line.

Function Documentation

◆ kargs_get()

int kargs_get ( const char * key,
const char ** value )

Looks up an argument of the kernel's command line.

Parameters
keythe argument's name
valueif not NULL, set to the argument's value, or to NULL if it has none (key alone rather than key=value)
Returns
0 if the argument was given, or -1 if it wasn't

Definition at line 73 of file kargs.c.

References kargc, kargs, and kargs_get().

Referenced by ata_probe(), earlycon_reinit(), i8042_init(), kargs_get(), kmain(), netif_config(), x86_apic_setup(), x86_clock_init(), x86_pit_period_set(), and x86_smp_init().

◆ kargs_parse()

int kargs_parse ( const char * _cmdline)

Splits the kernel's command line into arguments, at boot.

Parameters
_cmdlinethe command line, as the boot loader passed it
Returns
how many arguments there are, or -ENOMEM if there was no memory to split them

Definition at line 31 of file kargs.c.

References kargc, kargs, kargs_parse(), MAX_ARGS, NULL, and printk().

Referenced by aarch64_init(), kargs_parse(), and x86_cpu_init().