gpt: add search by disk uuid command
This commit is contained in:
parent
a8c24e86d0
commit
53a4e99990
9 changed files with 103 additions and 2 deletions
|
@ -40,6 +40,8 @@ static const struct grub_arg_option options[] =
|
|||
0, 0},
|
||||
{"part-uuid", 'U', 0, N_("Search devices by a partition UUID."),
|
||||
0, 0},
|
||||
{"disk-uuid", 'U', 0, N_("Search devices by a disk UUID."),
|
||||
0, 0},
|
||||
{"set", 's', GRUB_ARG_OPTION_OPTIONAL,
|
||||
N_("Set a variable to the first device found."), N_("VARNAME"),
|
||||
ARG_TYPE_STRING},
|
||||
|
@ -77,6 +79,7 @@ enum options
|
|||
SEARCH_FS_UUID,
|
||||
SEARCH_PART_LABEL,
|
||||
SEARCH_PART_UUID,
|
||||
SEARCH_DISK_UUID,
|
||||
SEARCH_SET,
|
||||
SEARCH_NO_FLOPPY,
|
||||
SEARCH_HINT,
|
||||
|
@ -198,6 +201,9 @@ grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
else if (state[SEARCH_PART_UUID].set)
|
||||
grub_search_part_uuid (id, var, state[SEARCH_NO_FLOPPY].set,
|
||||
hints, nhints);
|
||||
else if (state[SEARCH_DISK_UUID].set)
|
||||
grub_search_disk_uuid (id, var, state[SEARCH_NO_FLOPPY].set,
|
||||
hints, nhints);
|
||||
else if (state[SEARCH_FILE].set)
|
||||
grub_search_fs_file (id, var, state[SEARCH_NO_FLOPPY].set,
|
||||
hints, nhints);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue