Print this page
fixes + mirror
*** 61,70 ****
--- 61,71 ----
N_("HINT"), ARG_TYPE_STRING},
{"hint-arc", 0, GRUB_ARG_OPTION_REPEATABLE,
N_("First try the device HINT if currently running on ARC."
" If HINT ends in comma, also try subpartitions"),
N_("HINT"), ARG_TYPE_STRING},
+ {"zfs-mirror", 'z', 0, N_("Handle zfs-mirror disk"), 0, 0},
{0, 0, 0, 0, 0, 0}
};
enum options
{
*** 77,96 ****
--- 78,99 ----
SEARCH_HINT_IEEE1275,
SEARCH_HINT_BIOS,
SEARCH_HINT_BAREMETAL,
SEARCH_HINT_EFI,
SEARCH_HINT_ARC,
+ SEARCH_ZFS_MIRROR,
};
static grub_err_t
grub_cmd_search (grub_extcmd_context_t ctxt, int argc, char **args)
{
struct grub_arg_list *state = ctxt->state;
const char *var = 0;
const char *id = 0;
int i = 0, j = 0, nhints = 0;
char **hints = NULL;
+ int mirror_mode = 0;
if (state[SEARCH_HINT].set)
for (i = 0; state[SEARCH_HINT].args[i]; i++)
nhints++;
*** 175,193 ****
var = "root";
}
else
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
if (state[SEARCH_LABEL].set)
grub_search_label (id, var, state[SEARCH_NO_FLOPPY].set,
! hints, nhints);
else if (state[SEARCH_FS_UUID].set)
grub_search_fs_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);
else
return grub_error (GRUB_ERR_INVALID_COMMAND, "unspecified search type");
return grub_errno;
}
--- 178,199 ----
var = "root";
}
else
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
+ if (state[SEARCH_ZFS_MIRROR].set)
+ mirror_mode = 1;
+
if (state[SEARCH_LABEL].set)
grub_search_label (id, var, state[SEARCH_NO_FLOPPY].set,
! hints, nhints, mirror_mode);
else if (state[SEARCH_FS_UUID].set)
grub_search_fs_uuid (id, var, state[SEARCH_NO_FLOPPY].set,
! hints, nhints, mirror_mode);
else if (state[SEARCH_FILE].set)
grub_search_fs_file (id, var, state[SEARCH_NO_FLOPPY].set,
! hints, nhints, mirror_mode);
else
return grub_error (GRUB_ERR_INVALID_COMMAND, "unspecified search type");
return grub_errno;
}