mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 14:32:58 +00:00
e1531466e1
This change updates grub to the 2.04 release. The new release changed how grub is built, so the bootstrap and bootstrap.conf files have to be added to the dist-git. Also, the gitignore file changed so it has to be updated. Since the patches have been forward ported to 2.04, there's no need for a logic to maintain a patch with the delta between the release and the grub master branch. So the release-to-master.patch is dropped and no longer is updated by the do-rebase script. Also since gnulib isn't part of the grub repository anymore and cloned by the boostrap tool, a gnulib tarball is included as other source file and copied before calling the bootstrap tool. That way grub can be built even in builders that only have access to the sources lookaside cache. Resolves: rhbz#1727279 Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Peter Jones <pjones@redhat.com>
|
|
Date: Mon, 26 Jun 2017 12:42:57 -0400
|
|
Subject: [PATCH] Don't use dynamic sized arrays since we don't build with
|
|
-std=c99
|
|
|
|
---
|
|
grub-core/net/net.c | 17 ++++++++++++++---
|
|
1 file changed, 14 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
|
|
index f24f1fd63f6..5366e443d2a 100644
|
|
--- a/grub-core/net/net.c
|
|
+++ b/grub-core/net/net.c
|
|
@@ -1853,14 +1853,25 @@ grub_net_search_configfile (char *config)
|
|
{
|
|
/* By the Client UUID. */
|
|
|
|
- char client_uuid_var[sizeof ("net_") + grub_strlen (inf->name) +
|
|
- sizeof ("_clientuuid") + 1];
|
|
- grub_snprintf (client_uuid_var, sizeof (client_uuid_var),
|
|
+ char *client_uuid_var;
|
|
+ grub_size_t client_uuid_var_size;
|
|
+
|
|
+ client_uuid_var_size = grub_snprintf (NULL, 0,
|
|
+ "net_%s_clientuuid", inf->name);
|
|
+ if (client_uuid_var_size <= 0)
|
|
+ continue;
|
|
+ client_uuid_var_size += 1;
|
|
+ client_uuid_var = grub_malloc(client_uuid_var_size);
|
|
+ if (!client_uuid_var)
|
|
+ continue;
|
|
+ grub_snprintf (client_uuid_var, client_uuid_var_size,
|
|
"net_%s_clientuuid", inf->name);
|
|
|
|
const char *client_uuid;
|
|
client_uuid = grub_env_get (client_uuid_var);
|
|
|
|
+ grub_free(client_uuid_var);
|
|
+
|
|
if (client_uuid)
|
|
{
|
|
grub_strcpy (suffix, client_uuid);
|