mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-12-05 02:00:52 +00:00
448fa56b6a
- Make the release be 37 since 36 is the last one we actually built - Squash down the changelog for that as well - Fix some TPM errors on 32-bit (hdegoede) - More fixups to avoid compiler changes (pjones) - Put lsmmap into the EFI builds (pjones) Related: rhbz#1572126 Signed-off-by: Peter Jones <pjones@redhat.com>
50 lines
1.3 KiB
Diff
50 lines
1.3 KiB
Diff
From 9e962fd3c42081e2eef1f99a0eaab38fd04d2620 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
Date: Mon, 7 Aug 2017 18:05:17 +0200
|
|
Subject: [PATCH 054/246] mkrescue: Check xorriso presence before doing
|
|
anything else.
|
|
|
|
mkrescue can't do anything useful without xorriso, so abort early if it's
|
|
not available.
|
|
---
|
|
util/grub-mkrescue.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/util/grub-mkrescue.c b/util/grub-mkrescue.c
|
|
index 238d4840e2f..38f1543974e 100644
|
|
--- a/util/grub-mkrescue.c
|
|
+++ b/util/grub-mkrescue.c
|
|
@@ -323,6 +323,7 @@ check_xorriso (const char *val)
|
|
char *buf = NULL;
|
|
size_t len = 0;
|
|
int ret = 0;
|
|
+ int wstatus = 0;
|
|
|
|
argv[0] = xorriso;
|
|
argv[1] = "-as";
|
|
@@ -347,8 +348,10 @@ check_xorriso (const char *val)
|
|
}
|
|
|
|
close (fd);
|
|
- waitpid (pid, NULL, 0);
|
|
+ waitpid (pid, &wstatus, 0);
|
|
free (buf);
|
|
+ if (!WIFEXITED (wstatus) || WEXITSTATUS(wstatus) != 0)
|
|
+ return 0;
|
|
return ret;
|
|
}
|
|
|
|
@@ -478,6 +481,10 @@ main (int argc, char *argv[])
|
|
if (!output_image)
|
|
grub_util_error ("%s", _("output file must be specified"));
|
|
|
|
+ if (!check_xorriso ("graft-points")) {
|
|
+ grub_util_error ("%s", _("xorriso not found"));
|
|
+ }
|
|
+
|
|
grub_init_all ();
|
|
grub_hostfs_init ();
|
|
grub_host_init ();
|
|
--
|
|
2.17.1
|
|
|