From: "Vladimir 'phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] grub-fstest: Add a new command zfs-bootfs.
Date: Fri, 15 Mar 2024 22:59:04 +0300 [thread overview]
Message-ID: <CAEaD8JOZc3GHEYrfFRtHPvruJMkj+_cHqi=WhVi7RfMGfT01bA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
This is useful to check zfs-bootfs command.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
--
Regards
Vladimir 'phcoder' Serbinenko
[-- Attachment #2: 0001-grub-fstest-Add-a-new-command-zfs-bootfs.patch --]
[-- Type: application/octet-stream, Size: 1868 bytes --]
From 549e9e2a1f4d655cf186e1206ee9298e0aba6854 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Sat, 15 Jul 2023 23:10:12 +0200
Subject: [PATCH] grub-fstest: Add a new command zfs-bootfs.
This is useful to check zfs-bootfs command.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
util/grub-fstest.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/util/grub-fstest.c b/util/grub-fstest.c
index 25ae52ab6..06ca6a4cf 100644
--- a/util/grub-fstest.c
+++ b/util/grub-fstest.c
@@ -69,7 +69,8 @@ enum {
CMD_BLOCKLIST,
CMD_TESTLOAD,
CMD_ZFSINFO,
- CMD_XNU_UUID
+ CMD_XNU_UUID,
+ CMD_ZFS_BOOTFS
};
#define BUF_SIZE 32256
@@ -441,6 +442,9 @@ fstest (int n)
case CMD_ZFSINFO:
execute_command ("zfsinfo", n, args);
break;
+ case CMD_ZFS_BOOTFS:
+ execute_command ("zfs-bootfs", n, args);
+ break;
case CMD_CP:
cmd_cp (args[0], args[1]);
break;
@@ -518,6 +522,7 @@ static struct argp_option options[] = {
{N_("crc FILE"), 0, 0 , OPTION_DOC, N_("Get crc32 checksum of FILE."), 1},
{N_("blocklist FILE"), 0, 0, OPTION_DOC, N_("Display blocklist of FILE."), 1},
{N_("xnu_uuid DEVICE"), 0, 0, OPTION_DOC, N_("Compute XNU UUID of the device."), 1},
+ {N_("zfs-bootfs ZFS_DATASET"), 0, 0, OPTION_DOC, N_("Compute zfs dataset bootpath."), 1},
{"root", 'r', N_("DEVICE_NAME"), 0, N_("Set root device."), 2},
{"skip", 's', N_("NUM"), 0, N_("Skip N bytes from output file."), 2},
@@ -712,6 +717,11 @@ argp_parser (int key, char *arg, struct argp_state *state)
cmd = CMD_XNU_UUID;
nparm = 0;
}
+ else if (grub_strcmp (arg, "zfs-bootfs") == 0)
+ {
+ cmd = CMD_ZFS_BOOTFS;
+ nparm = 0;
+ }
else
{
fprintf (stderr, _("Invalid command %s.\n"), arg);
--
2.39.2
[-- Attachment #3: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next reply other threads:[~2024-03-15 19:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-15 19:59 Vladimir 'phcoder' Serbinenko [this message]
2024-04-10 15:00 ` [PATCH] grub-fstest: Add a new command zfs-bootfs Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEaD8JOZc3GHEYrfFRtHPvruJMkj+_cHqi=WhVi7RfMGfT01bA@mail.gmail.com' \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).