PatchworkOS
Loading...
Searching...
No Matches
argv_t Struct Reference

Argument Vector structure. More...

#include <argv.h>

Data Fields

char ** buffer
 
char * empty [1]
 !< Stores both pointers and strings.
 
uint64_t size
 !< Used to avoid allocations for empty argv
 
uint64_t amount
 !< Size of the buffer in bytes.
 

Detailed Description

Argument Vector structure.

Stores the arguments passed to a process in a contiguous buffer in the format:

[ptr to arg0][ptr to arg1]...[ptr to argN][NULL][arg0 string][arg1 string]...[argN string]
#define NULL
Pointer error value.
Definition NULL.h:23

Definition at line 22 of file argv.h.

Field Documentation

◆ amount

uint64_t argv_t::amount

!< Size of the buffer in bytes.

Number of arguments (excluding the NULL terminator).

Definition at line 27 of file argv.h.

Referenced by argv_get_strings(), argv_init(), loader_process_entry(), and loader_setup_argv().

◆ buffer

char** argv_t::buffer

◆ empty

char* argv_t::empty[1]

!< Stores both pointers and strings.

Definition at line 25 of file argv.h.

Referenced by argv_deinit(), and argv_init().

◆ size

uint64_t argv_t::size

!< Used to avoid allocations for empty argv

Definition at line 26 of file argv.h.

Referenced by argv_get_strings(), argv_init(), and loader_setup_argv().


The documentation for this struct was generated from the following file: