113 int default_flags,
int no_root_path_flags ) {
116 struct uri *uris[argc];
128 goto err_parse_options;
132 for ( i = 0 ; i <
count ; i++ ) {
147 flags = default_flags;
148 if (
opts.no_describe )
153 flags |= no_root_path_flags;
163 for ( i-- ; i >= 0 ; i-- )
#define NULL
NULL pointer (VOID *)
struct arbelprm_rc_send_wqe rc
int uriboot(struct uri *filename, struct uri **root_paths, unsigned int root_path_count, int drive, struct san_boot_config *san_config, unsigned int flags)
Boot from filename and root-path URIs.
@ URIBOOT_NO_SAN_DESCRIBE
static union @024010030001061367220137227263210031030210157031 opts
"cert<xxx>" option list
#define COMMAND(name, exec)
int optind
Current option index.
Parse command-line options.
@ required_argument
Option requires an argument.
@ no_argument
Option does not take an argument.
uint8_t drive
Drive number.
static unsigned int count
Number of entries.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENOMEM
Not enough space.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
uint8_t extra
Signature extra byte.
void * memset(void *dest, int character, size_t len) __nonnull
int parse_flag(char *text __unused, int *flag)
Parse flag.
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
int parse_string(char *text, char **value)
Parse string value.
int parse_uuid(char *text, struct uuid_option *uuid)
Parse UUID.
int parse_integer(char *text, unsigned int *value)
Parse integer value.
Command line option parsing.
#define MAX_ARGUMENTS
No maximum number of arguments.
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
unsigned int san_default_drive(void)
Get default SAN drive number.
static int sanhook_exec(int argc, char **argv)
The "sanhook" command.
static struct command_descriptor sanhook_cmd
"sanhook" command descriptor
static struct command_descriptor sanunhook_cmd
"sanunhook" command descriptor
struct option_descriptor sanunhook[1]
struct option_descriptor sanboot[7]
struct option_descriptor sanhook[2]
static struct command_descriptor sanboot_cmd
"sanboot" command descriptor
static int sanboot_exec(int argc, char **argv)
The "sanboot" command.
static int sanboot_core_exec(int argc, char **argv, struct command_descriptor *cmd, int default_flags, int no_root_path_flags)
The "sanboot", "sanhook" and "sanunhook" commands.
static int sanunhook_exec(int argc, char **argv)
The "sanunhook" command.
A command-line option descriptor.
SAN boot configuration parameters.
const char * filename
Boot filename (or NULL to use default)
const char * label
Filesystem label (or NULL to ignore volume label)
union uuid * uuid
UUID (or NULL to ignore UUID)
const char * extra
Required extra filename (or NULL to ignore)
struct uuid_option uuid
UUID.
int no_describe
Do not describe SAN device.
unsigned int drive
Drive number.
char * extra
Required extra filename.
char * filename
Boot filename.
char * label
Volume label.
A Uniform Resource Identifier.
A UUID command-line option.
struct uri * parse_uri(const char *uri_string)
Parse URI.
Uniform Resource Identifiers.
static void uri_put(struct uri *uri)
Decrement URI reference count.