| EFI_VARIABLE_RUNTIME_ACCESS;
}
+static void
+free_vars(list_t *head)
+{
+ list_t *pos, *n;
+ var_entry_t *boot;
+
+ list_for_each_safe(pos, n, head) {
+ boot = list_entry(pos, var_entry_t, list);
+ list_del(&(boot->list));
+ free(boot);
+ }
+}
static void
read_vars(struct dirent **namelist,
printf("\t-v | --verbose print additional information\n");
printf("\t-V | --version return version and exit\n");
printf("\t-w | --write-signature write unique sig to MBR if needed\n");
+ printf("\t-@ | --append-binary-args file append extra args from file (use \"-\" for stdin)\n");
}
static void
{"verbose", optional_argument, 0, 'v'},
{"version", no_argument, 0, 'V'},
{"write-signature", no_argument, 0, 'w'},
+ {"append-binary-args", required_argument, 0, '@'},
{0, 0, 0, 0}
};
c = getopt_long (argc, argv,
- "AaBb:cd:e:E:gH:i:l:L:n:No:Op:qt:TuU:v::Vw",
+ "AaBb:cd:e:E:gH:i:l:L:n:No:Op:qt:TuU:v::Vw@:",
long_options, &option_index);
if (c == -1)
break;
switch (c)
{
+ case '@':
+ opts.extra_opts_file = optarg;
+ break;
case 'a':
opts.active = 1;
break;
}
}
free_dirents(boot_names, num_boot_names);
+ free_vars(&boot_entry_list);
return 0;
}