Accepting request 1172867 from Base:System
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/1172867 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=326
This commit is contained in:
commit
80456a1bc5
@ -9,6 +9,17 @@ v3:
|
|||||||
* Use xcalloc for overflow check and return NULL when it would
|
* Use xcalloc for overflow check and return NULL when it would
|
||||||
occur.
|
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
|
--- a/grub-core/kern/fs.c
|
||||||
+++ b/grub-core/kern/fs.c
|
+++ b/grub-core/kern/fs.c
|
||||||
@ -49,7 +60,7 @@ v3:
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -120,6 +123,140 @@
|
@@ -120,6 +123,142 @@
|
||||||
NULL, help_filter, NULL
|
NULL, help_filter, NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -88,6 +99,8 @@ v3:
|
|||||||
+ off = strtol (value, &p, 10);
|
+ off = strtol (value, &p, 10);
|
||||||
+ if (*p == '+')
|
+ if (*p == '+')
|
||||||
+ sz = strtol (p+1, &p, 10);
|
+ sz = strtol (p+1, &p, 10);
|
||||||
|
+ else
|
||||||
|
+ return 0;
|
||||||
+
|
+
|
||||||
+ if (*p == '\0')
|
+ if (*p == '\0')
|
||||||
+ {
|
+ {
|
||||||
@ -190,7 +203,7 @@ v3:
|
|||||||
static grub_envblk_t
|
static grub_envblk_t
|
||||||
open_envblk_file (const char *name)
|
open_envblk_file (const char *name)
|
||||||
{
|
{
|
||||||
@@ -182,10 +319,17 @@
|
@@ -182,10 +321,17 @@
|
||||||
list_variables (const char *name)
|
list_variables (const char *name)
|
||||||
{
|
{
|
||||||
grub_envblk_t envblk;
|
grub_envblk_t envblk;
|
||||||
@ -208,7 +221,7 @@ v3:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -209,6 +353,38 @@
|
@@ -209,6 +355,38 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -247,7 +260,7 @@ v3:
|
|||||||
set_variables (const char *name, int argc, char *argv[])
|
set_variables (const char *name, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
grub_envblk_t envblk;
|
grub_envblk_t envblk;
|
||||||
@@ -224,8 +400,27 @@
|
@@ -224,8 +402,27 @@
|
||||||
|
|
||||||
*(p++) = 0;
|
*(p++) = 0;
|
||||||
|
|
||||||
@ -277,7 +290,7 @@ v3:
|
|||||||
|
|
||||||
argc--;
|
argc--;
|
||||||
argv++;
|
argv++;
|
||||||
@@ -233,26 +428,158 @@
|
@@ -233,26 +430,158 @@
|
||||||
|
|
||||||
write_envblk (name, envblk);
|
write_envblk (name, envblk);
|
||||||
grub_envblk_close (envblk);
|
grub_envblk_close (envblk);
|
||||||
@ -315,8 +328,8 @@ v3:
|
|||||||
+ write_envblk_fs (envblk_fs);
|
+ write_envblk_fs (envblk_fs);
|
||||||
+ grub_envblk_close (envblk_fs);
|
+ grub_envblk_close (envblk_fs);
|
||||||
+ }
|
+ }
|
||||||
+}
|
}
|
||||||
+
|
|
||||||
+int have_abstraction = 0;
|
+int have_abstraction = 0;
|
||||||
+static void
|
+static void
|
||||||
+probe_abstraction (grub_disk_t disk)
|
+probe_abstraction (grub_disk_t disk)
|
||||||
@ -329,8 +342,8 @@ v3:
|
|||||||
+ {
|
+ {
|
||||||
+ have_abstraction = 1;
|
+ have_abstraction = 1;
|
||||||
+ }
|
+ }
|
||||||
}
|
+}
|
||||||
|
+
|
||||||
+static fs_envblk_t
|
+static fs_envblk_t
|
||||||
+probe_fs_envblk (fs_envblk_spec_t spec)
|
+probe_fs_envblk (fs_envblk_spec_t spec)
|
||||||
+{
|
+{
|
||||||
@ -436,7 +449,7 @@ v3:
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -284,6 +611,9 @@
|
@@ -284,6 +613,9 @@
|
||||||
command = argv[curindex++];
|
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>
|
Fri Apr 19 21:50:53 UTC 2024 - Giacomo Comes <gcomes.obs@gmail.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user