The "sanboot", "sanhook" and "sanunhook" commands.
- Parameters
-
| argc | Argument count |
| argv | Argument list |
| default_flags | Default set of flags for uriboot() |
| no_root_path_flags | Additional flags to apply if no root path is present |
- Return values
-
Definition at line 110 of file sanboot_cmd.c.
115 struct uri *uris[argc];
127 goto err_parse_options;
131 for ( i = 0 ; i <
count ; i++ ) {
140 config.filename =
opts.filename;
141 config.extra =
opts.extra;
142 config.label =
opts.label;
143 config.uuid =
opts.uuid.value;
146 flags = default_flags;
147 if (
opts.no_describe )
152 flags |= no_root_path_flags;
162 for ( i-- ; i >= 0 ; i-- )
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.
struct arbelprm_rc_send_wqe rc
static void uri_put(struct uri *uri)
Decrement URI reference count.
int optind
Current option index.
unsigned int san_default_drive(void)
Get default SAN drive number.
#define ENOMEM
Not enough space.
SAN boot configuration parameters.
static unsigned int count
Number of entries.
int reparse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Reparse command-line options.
A Uniform Resource Identifier.
static union @450 opts
"sanboot" option list
#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
References cmd, count, ENOMEM, san_boot_config::extra, san_boot_config::filename, flags, san_boot_config::label, memset(), NULL, optind, opts, parse_uri(), rc, reparse_options(), san_default_drive(), uri_put(), uriboot(), URIBOOT_NO_SAN_DESCRIBE, URIBOOT_NO_SAN_UNHOOK, and san_boot_config::uuid.
Referenced by sanboot_exec(), sanhook_exec(), and sanunhook_exec().