forked from pool/grub2
Accepting request 1171280 from home:michael-chang:branches:Base:System
- Fix gcc error with CFLAGS=-Og * grub2-grubenv-in-btrfs-header.patch OBS-URL: https://build.opensuse.org/request/show/1171280 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=502
This commit is contained in:
parent
3b9b62e001
commit
a4a2862b65
@ -9,6 +9,17 @@ v3:
|
||||
* Use xcalloc for overflow check and return NULL when it would
|
||||
occur.
|
||||
|
||||
v4:
|
||||
* Fix gcc error with CFLAGS=-Og
|
||||
|
||||
../util/grub-editenv.c: In function ‘read_envblk_fs’:
|
||||
../util/grub-editenv.c:172:14: error: ‘sz’ may be used uninitialized [-Werror=maybe-uninitialized]
|
||||
172 | sz <<= GRUB_DISK_SECTOR_BITS;
|
||||
../util/grub-editenv.c:155:16: note: ‘sz’ was declared here
|
||||
155 | int off, sz;
|
||||
| ^~
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
---
|
||||
--- a/grub-core/kern/fs.c
|
||||
+++ b/grub-core/kern/fs.c
|
||||
@ -49,7 +60,7 @@ v3:
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@@ -120,6 +123,140 @@
|
||||
@@ -120,6 +123,142 @@
|
||||
NULL, help_filter, NULL
|
||||
};
|
||||
|
||||
@ -88,6 +99,8 @@ v3:
|
||||
+ off = strtol (value, &p, 10);
|
||||
+ if (*p == '+')
|
||||
+ sz = strtol (p+1, &p, 10);
|
||||
+ else
|
||||
+ return 0;
|
||||
+
|
||||
+ if (*p == '\0')
|
||||
+ {
|
||||
@ -190,7 +203,7 @@ v3:
|
||||
static grub_envblk_t
|
||||
open_envblk_file (const char *name)
|
||||
{
|
||||
@@ -182,10 +319,17 @@
|
||||
@@ -182,10 +321,17 @@
|
||||
list_variables (const char *name)
|
||||
{
|
||||
grub_envblk_t envblk;
|
||||
@ -208,7 +221,7 @@ v3:
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -209,6 +353,38 @@
|
||||
@@ -209,6 +355,38 @@
|
||||
}
|
||||
|
||||
static void
|
||||
@ -247,7 +260,7 @@ v3:
|
||||
set_variables (const char *name, int argc, char *argv[])
|
||||
{
|
||||
grub_envblk_t envblk;
|
||||
@@ -224,8 +400,27 @@
|
||||
@@ -224,8 +402,27 @@
|
||||
|
||||
*(p++) = 0;
|
||||
|
||||
@ -277,7 +290,7 @@ v3:
|
||||
|
||||
argc--;
|
||||
argv++;
|
||||
@@ -233,26 +428,158 @@
|
||||
@@ -233,26 +430,158 @@
|
||||
|
||||
write_envblk (name, envblk);
|
||||
grub_envblk_close (envblk);
|
||||
@ -315,8 +328,8 @@ v3:
|
||||
+ write_envblk_fs (envblk_fs);
|
||||
+ grub_envblk_close (envblk_fs);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
+int have_abstraction = 0;
|
||||
+static void
|
||||
+probe_abstraction (grub_disk_t disk)
|
||||
@ -329,8 +342,8 @@ v3:
|
||||
+ {
|
||||
+ have_abstraction = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
+static fs_envblk_t
|
||||
+probe_fs_envblk (fs_envblk_spec_t spec)
|
||||
+{
|
||||
@ -436,7 +449,7 @@ v3:
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@@ -284,6 +611,9 @@
|
||||
@@ -284,6 +613,9 @@
|
||||
command = argv[curindex++];
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu May 2 07:48:30 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
- Fix gcc error with CFLAGS=-Og
|
||||
* grub2-grubenv-in-btrfs-header.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 19 21:50:53 UTC 2024 - Giacomo Comes <gcomes.obs@gmail.com>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user