34 {
"net", 1,
NULL,
'n'},
35 {
"settings", 1,
NULL,
's'},
55 DBG(
"Bad parameter: '%s'\n",
name);
87 printf(
"Missing driver name");
91 dev_request =
malloc(
sizeof(*dev_request));
101 printf(
"Parsing net settings failed");
125 int option_index = 0;
174 .
name =
"linux_args",
struct arbelprm_rc_send_wqe rc
struct list_head list
List node.
static __always_inline void off_t int c
int printf(const char *fmt,...)
Write a formatted string to the console.
static int parse_settings_args(char *args)
Parse –settings arguments.
#define list_add(new, head)
Add a new entry to the head of a list.
#define STARTUP_EARLY
Early startup.
Linux devices, drivers and device requests.
void linux_args_parse()
Parse passed command-line arguments.
A doubly-linked list entry (or list head)
Dynamic memory allocation.
A startup/shutdown function.
#define list_del(list)
Delete an entry from a list.
FILE_LICENCE(GPL2_OR_LATER)
#define __unused
Declare a variable or data structure as unused.
Parse command-line options.
A long option, as used for getopt_long()
pseudo_bit_t value[0x00020]
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
A device request setting.
#define list_for_each_entry_safe(pos, tmp, head, member)
Iterate over entries in a list, safe against deletion of the current entry.
static void(* free)(struct refcnt *refcnt))
static int parse_kv(char *kv, struct list_head *list)
Parse k1=v1[,k2=v2]* into linux_settings.
size_t strlen(const char *src)
Get length of string.
char * driver
Driver name.
void * malloc(size_t size)
Allocate memory.
static void reset_getopt(void)
Reset getopt() internal state.
int getopt_long(int argc, char *const argv[], const char *optstring, const struct option *longopts, int *longindex)
Parse command-line options.
struct startup_fn startup_linux_args __startup_fn(STARTUP_EARLY)
#define INIT_LIST_HEAD(list)
Initialise a list head.
struct list_head linux_global_settings
List of global settings to apply.
struct list_head list
List node.
u8 request[0]
List of IEs requested.
static struct option options[]
Supported command-line options.
static int parse_net_args(char *args)
Parse –net arguments.
char * optarg
Option argument.
struct list_head settings
List of settings.
#define DBG(...)
Print a debugging message.
#define NULL
NULL pointer (VOID *)
void linux_args_cleanup(int flags __unused)
Clean up requests and settings.
struct list_head linux_device_requests
List of requested devices.