Error out if mtools invocation fails.

This commit is contained in:
Vladimir Serbinenko 2016-01-22 19:28:08 +01:00
parent 605eecc985
commit ff84a9b868
1 changed files with 7 additions and 2 deletions

View File

@ -787,9 +787,14 @@ main (int argc, char *argv[])
free (efidir_efi_boot);
efiimgfat = grub_util_path_concat (2, iso9660_dir, "efi.img");
grub_util_exec ((const char * []) { "mformat", "-C", "-f", "2880", "-L", "16", "-i",
int rv;
rv = grub_util_exec ((const char * []) { "mformat", "-C", "-f", "2880", "-L", "16", "-i",
efiimgfat, "::", NULL });
grub_util_exec ((const char * []) { "mcopy", "-s", "-i", efiimgfat, efidir_efi, "::/", NULL });
if (rv != 0)
grub_util_error ("`%s` invocation failed\n", "mformat");
rv = grub_util_exec ((const char * []) { "mcopy", "-s", "-i", efiimgfat, efidir_efi, "::/", NULL });
if (rv != 0)
grub_util_error ("`%s` invocation failed\n", "mformat");
xorriso_push ("--efi-boot");
xorriso_push ("efi.img");
xorriso_push ("-efi-boot-part");