Lines Matching refs:option

1086  * Removes the boot option property specified by bootopt,
1911 EPRINT("failed to create load option %s\n", boot_name);
2163 * set to 0 for the load option.
2371 * Create a new load option from logical_drive and initialize.
2378 * boot option access functions below:
2426 EPRINT("unable to create boot option\n");
2441 uefirt_free_load_option(uefi_load_option_t *option)
2443 if (option->dpath_list != NULL) {
2444 free_device_path(option->dpath_list);
2447 free(option->desc);
2448 free(option->optdata);
2449 free(option);
2454 * Given a Boot#### boot_name, fetch the load option property
2472 uefi_load_option_t *option;
2490 "option %s\n", boot_name);
2498 EPRINT("unable to read load option for %s: %"
2505 option = *boot_opt = calloc(1, sizeof (uefi_load_option_t));
2507 if (option == NULL) {
2508 EPRINT("unable to allocate load option "
2515 option->attr = LE_32(*attr_ptr);
2519 option->dpath_len = dpath_len;
2524 option->desc = malloc(desc_len);
2525 if (option->desc == NULL) {
2529 uefirt_free_load_option(option);
2533 bcopy(desc_ptr, option->desc, desc_len);
2536 desc_len + option->dpath_len;
2537 option->optdata_len = option_size - optional_data_offset;
2539 if (option->optdata_len != 0) {
2540 option->optdata = malloc(option->optdata_len);
2541 if (option->optdata == NULL) {
2545 uefirt_free_load_option(option);
2550 bcopy(optional_data_ptr, option->optdata,
2551 option->optdata_len);
2554 option->dpath_list = NULL;
2574 uefirt_free_load_option(option);
2583 uefirt_free_load_option(option);
2590 ret = add_device_path(&option->dpath_list, device_path);
2595 uefirt_free_load_option(option);
2607 uefirt_free_load_option(option);
2965 uefi_load_option_t *option;
2968 ret = uefi_get_load_option(hdl, bootopt, &option);
2971 EPRINT("unable to get load option: %d\n", ret);
2976 option->attr = attributes;
2981 if (uefirt_boot_store_bootopt(hdl, option->attr,
2982 option->desc, option->dpath_list, option->optdata,
2983 option->optdata_len, bootopt)) {
2984 EPRINT("unable to create boot option\n");
2985 uefirt_free_load_option(option);
2990 uefirt_free_load_option(option);
3001 uefi_load_option_t *option;
3004 ret = uefi_get_load_option(hdl, bootopt, &option);
3007 EPRINT("unable to get load option: %d\n", ret);
3012 *attributes = option->attr;
3014 uefirt_free_load_option(option);
3024 uefi_load_option_t *option;
3028 ret = uefi_get_load_option(hdl, bootopt, &option);
3031 EPRINT("unable to get load option: %d\n", ret);
3046 if (uefirt_boot_store_bootopt(hdl, option->attr,
3047 desc16, option->dpath_list, option->optdata,
3048 option->optdata_len, bootopt)) {
3049 EPRINT("unable to create boot option\n");
3050 uefirt_free_load_option(option);
3057 uefirt_free_load_option(option);
3068 uefi_load_option_t *option;
3073 ret = uefi_get_load_option(hdl, bootopt, &option);
3076 EPRINT("unable to get load option: %d\n", ret);
3081 desc16_len = unicode_strlen(option->desc);
3083 (void) uconv_u16tou8(option->desc, &desc16_len,
3087 uefirt_free_load_option(option);
3114 uefi_load_option_t *option;
3117 ret = uefi_get_load_option(hdl, bootopt, &option);
3120 EPRINT("unable to get load option: %d\n", ret);
3127 uefirt_free_load_option(option);
3137 while (option->dpath_list[i] != NULL) {
3138 dp = option->dpath_list[i];
3151 new_path_array = realloc(option->dpath_list,
3157 uefirt_free_load_option(option);
3161 option->dpath_list = new_path_array;
3163 option->dpath_list[i + 1] = NULL;
3164 option->dpath_list[i] = option->dpath_list[i - 1];
3165 free(option->dpath_list[i - 1]);
3166 option->dpath_list[i - 1] = *dpath;
3168 free(option->dpath_list[i]);
3169 option->dpath_list[i] = *dpath;
3175 if (uefirt_boot_store_bootopt(hdl, option->attr,
3176 option->desc, option->dpath_list, option->optdata,
3177 option->optdata_len, bootopt)) {
3178 EPRINT("unable to create boot option\n");
3179 uefirt_free_load_option(option);
3184 uefirt_free_load_option(option);
3194 uefi_load_option_t *option;
3203 ret = uefi_get_load_option(hdl, bootopt, &option);
3206 EPRINT("unable to get load option: %d\n", ret);
3211 if (option->dpath_list == NULL) {
3212 uefirt_free_load_option(option);
3218 while (option->dpath_list[i] != NULL) {
3219 dp = option->dpath_list[i];
3230 EPRINT("no file path info in this boot option\n");
3231 uefirt_free_load_option(option);
3255 uefirt_free_load_option(option);
3262 uefirt_free_load_option(option);
3282 uefirt_free_load_option(option);
3287 uefirt_free_load_option(option);
3297 uefirt_free_load_option(option);
3308 uefi_load_option_t *option;
3311 ret = uefi_get_load_option(hdl, bootopt, &option);
3314 EPRINT("unable to get load option: %d\n", ret);
3319 if (option->optdata) {
3320 free(option->optdata);
3321 option->optdata = NULL;
3322 option->optdata_len = 0;
3326 option->optdata = malloc(optdata_len);
3327 if (option->optdata == NULL) {
3329 uefirt_free_load_option(option);
3333 bcopy(optdata, option->optdata, optdata_len);
3334 option->optdata_len = optdata_len;
3340 if (uefirt_boot_store_bootopt(hdl, option->attr,
3341 option->desc, option->dpath_list, option->optdata,
3342 option->optdata_len, bootopt)) {
3343 EPRINT("unable to create boot option\n");
3344 uefirt_free_load_option(option);
3349 uefirt_free_load_option(option);
3359 uefi_load_option_t *option;
3362 ret = uefi_get_load_option(hdl, bootopt, &option);
3365 EPRINT("unable to get load option: %d\n", ret);
3366 uefirt_free_load_option(option);
3371 if (option->optdata == NULL) {
3372 uefirt_free_load_option(option);
3377 *opt_data = malloc(option->optdata_len);
3380 uefirt_free_load_option(option);
3384 *opt_data_len = option->optdata_len;
3392 bcopy(option->optdata, *opt_data, option->optdata_len);
3394 uefirt_free_load_option(option);
3405 uefi_load_option_t *option;
3410 ret = uefi_get_load_option(hdl, bootopt, &option);
3413 EPRINT("unable to get load option: %d\n", ret);
3418 if (option->dpath_list[0]->type == UEFI_ACPI_PATH) {
3419 uefirt_free_load_option(option);
3428 while (option->dpath_list[i] != NULL) {
3429 dp = option->dpath_list[i];
3441 uefirt_free_load_option(option);
3460 uefirt_free_load_option(option);
3474 uefi_load_option_t *option;
3478 ret = uefi_get_load_option(hdl, bootopt, &option);
3486 device_path = option->dpath_list;
3493 uefirt_free_load_option(option);
3513 * of the array represents an individual Boot#### option. The
3598 * Search the list of existing boot option Boot#### properties
3636 uefi_load_option_t *option;
3639 ret = uefi_get_load_option(hdl, *allbootopt, &option);
3642 EPRINT("unable to get load option: %d\n", ret);
3648 dpath = option->dpath_list;
3662 uefirt_free_load_option(option);
3672 uefirt_free_load_option(option);
3683 uefirt_free_load_option(option);