reviews on the changes from people with experience in
the codebase, and that one day we will be able to stop maintaining our
fork.
On Wed, Mar 25, 2020 at 10:06 AM Daniel Kiper wrote:
>
> Hi Paul,
>
> On Wed, Mar 11, 2020 at 10:37:08AM -0700, Paul Dagnelie wrote:
> > Hey all, I pr
envblk logic doesn't store the file size, so the only way to retrieve it is to
determine the length of the file using strlen. If this is considered too poor
of an approach to be acceptable, format changes can still be made to the
structure of the padding area.
Signed-off-by: Paul Dagnelie
---
grub
This patch factors out the filling of the grubenv buffer into a separate
function for reuse.
Signed-off-by: Paul Dagnelie
---
include/grub/util/install.h | 3 +++
util/editenv.c | 26 +-
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git
are present
in the version of libzfs present at build time. There is also a small
whitespace fix in grub-editenv unrelated to the content of these changes.
Signed-off-by: Paul Dagnelie
---
configure.ac | 8 ++
include/grub/util/libzfs.h | 7 +
util/grub-editenv.c| 278
This patch refactors out the logic that applies filters to files for reuse in
other code.
Signed-off-by: Paul Dagnelie
---
grub-core/kern/file.c | 46 +--
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/grub-core/kern/file.c b/grub-core
be used
to force the file or envblock logic to be used.
Signed-off-by: Paul Dagnelie
---
grub-core/commands/loadenv.c | 122 ++-
include/grub/lib/envblk.h| 2 +
2 files changed, 109 insertions(+), 15 deletions(-)
diff --git a/grub-core/commands/loadenv.c b
and the
per-fs logic, an interface for which is also added as part of this patch.
Signed-off-by: Paul Dagnelie
---
grub-core/kern/file.c | 30 --
include/grub/file.h | 10 ++
include/grub/fs.h | 12
3 files changed, 50 insertions(+), 2
This patch refactors the DEFAULT_ENVBLK_SIZE definition into a header file for
reuse in other code, and renames it to match other definitions in that header.
Signed-off-by: Paul Dagnelie
---
include/grub/lib/envblk.h | 1 +
util/editenv.c| 9 -
2 files changed, 5 insertions
github.com/zfsonlinux/zfs/pull/10009 , the ZoL patch that
enables ZFS to read from and write to the padding areas we reserved
for the data.
Paul Dagnelie (7):
Factor out file filter function for reuse
Add support for special envblk functions in GRUB
Factor out envblk buffer creation for reuse
: Paul Dagnelie
AuthorDate: Mon Feb 24 14:29:47 2020 -0800
Commit: Paul Dagnelie
CommitDate: Tue Feb 25 10:08:08 2020 -0800
Update editenv to support editing zfs envblock
---
include/grub/util/libzfs.h | 7 ++
util/grub-editenv.c| 279
the grubenv file from a file or from the envblk even if it
would not automatically choose to do so.
commit d9e66e27592ad83f4a90d0e231a9ffc679617cae
Author: Paul Dagnelie
AuthorDate: Mon Feb 24 13:40:55 2020 -0800
Commit: Paul Dagnelie
CommitDate: Tue Feb 25 10:08:07 2020 -0800
Use
reliability.
commit 0f108fee27917afd72d834620db8f8b1e7ca1699
Author: Paul Dagnelie
AuthorDate: Mon Feb 24 14:29:35 2020 -0800
Commit: Paul Dagnelie
CommitDate: Tue Feb 25 10:08:08 2020 -0800
Add ZFS envblock functions
---
grub-core/fs/zfs/zfs.c | 129
: Paul Dagnelie
AuthorDate: Mon Feb 24 11:19:40 2020 -0800
Commit: Paul Dagnelie
CommitDate: Tue Feb 25 10:08:07 2020 -0800
Add support for special envblk functions in GRUB
---
grub-core/kern/file.c | 76 +--
include/grub/file.h | 10
down). Is there a
preference in this codebase against consistency when other
considerations are also relevant?
--
Paul Dagnelie
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
;
+
+ fs_envblk_spec_t *p;
+
+ for (p = spec; p->fs_name; p++)
+{
+ if (strcmp (grub_fs->name, p->fs_name) == 0 && !have_abstraction)
+{
+ grub_util_info ("Detected envblock support in %s, leveraging",
grub_fs->name);
+ fs_envblk = xmalloc (sizeof (fs_envblk_t));
+ fs_envblk->spec = p;
+ fs_envblk->fs = grub_fs;
+ fs_envblk->data = p->fs_init (grub_dev);
+ grub_device_close (grub_dev);
+ return fs_envblk;
+}
+}
+
+ grub_device_close (grub_dev);
+ return NULL;
}
int
@@ -278,8 +524,11 @@ main (int argc, char *argv[])
command = argv[curindex++];
}
+ if (strcmp (filename, DEFAULT_ENVBLK_PATH) == 0)
+fs_envblk = probe_fs_envblk (fs_envblk_table);
+
if (strcmp (command, "create") == 0)
-grub_util_create_envblk_file (filename);
+create_envblk (filename);
else if (strcmp (command, "list") == 0)
list_variables (filename);
else if (strcmp (command, "set") == 0)
--
Paul Dagnelie
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
u for your time and attention!
--
Paul Dagnelie
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
16 matches
Mail list logo