112 int default_flags,
int no_root_path_flags ) {
115 struct uri *uris[argc];
127 goto err_parse_options;
131 for ( i = 0 ; i <
count ; i++ ) {
146 flags = default_flags;
147 if (
opts.no_describe )
152 flags |= no_root_path_flags;
162 for ( i-- ; i >= 0 ; i-- )
int parse_integer(char *text, unsigned int *value)
Parse integer value.
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.
static union @441 opts
"sanboot" option list
static struct command_descriptor sanboot_cmd
"sanboot" command descriptor
struct arbelprm_rc_send_wqe rc
struct option_descriptor sanhook[2]
static void uri_put(struct uri *uri)
Decrement URI reference count.
int optind
Current option index.
int parse_uuid(char *text, struct uuid_option *uuid)
Parse UUID.
A UUID command-line option.
static struct command_descriptor sanunhook_cmd
"sanunhook" command descriptor
static int sanboot_exec(int argc, char **argv)
The "sanboot" command.
uint8_t extra
Signature extra byte.
struct command sanboot_commands [] __command
SAN commands.
char * extra
Required extra filename.
unsigned int san_default_drive(void)
Get default SAN drive number.
struct option_descriptor sanunhook[1]
uint8_t drive
Drive number.
Uniform Resource Identifiers.
static int sanhook_exec(int argc, char **argv)
The "sanhook" command.
#define ENOMEM
Not enough space.
char * label
Volume label.
Parse command-line options.
struct option_descriptor sanboot[7]
int parse_string(char *text, char **value)
Parse string value.
SAN boot configuration parameters.
union uuid * uuid
UUID (or NULL to ignore UUID)
#define MAX_ARGUMENTS
No maximum number of arguments.
uint16_t count
Number of entries.
const char * filename
Boot filename (or NULL to use default)
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
int parse_flag(char *text __unused, int *flag)
Parse flag.
Command line option parsing.
const char * label
Filesystem label (or NULL to ignore volume label)
Option does not take an argument.
static int sanunhook_exec(int argc, char **argv)
The "sanunhook" command.
unsigned int drive
Drive number.
const char * name
Name of the command.
const char * extra
Required extra filename (or NULL to ignore)
static struct command_descriptor sanhook_cmd
"sanhook" command descriptor
#define OPTION_DESC(_longopt, _shortopt, _has_arg, _struct, _field, _parse)
Construct option descriptor.
Option requires an argument.
A command-line option descriptor.
char * filename
Boot filename.
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
A Uniform Resource Identifier.
int no_describe
Do not describe SAN device.
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.
#define NULL
NULL pointer (VOID *)
struct uri * parse_uri(const char *uri_string)
Parse URI.
void * memset(void *dest, int character, size_t len) __nonnull