[PATCH v2 3/5] commands: introduce new security command group
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Aug 7 01:19:40 PDT 2025
From: Ahmad Fatoum <a.fatoum at barebox.org>
Instead of putting security-related commands into misc, let's give them
their own group.
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
v1 -> v2:
- unchanged
---
commands/avb_pvalue.c | 2 +-
commands/blobgen.c | 2 +-
commands/help.c | 1 +
commands/keystore.c | 2 +-
include/command.h | 3 ++-
5 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/commands/avb_pvalue.c b/commands/avb_pvalue.c
index d91c311de5ec..70d39b8e84f8 100644
--- a/commands/avb_pvalue.c
+++ b/commands/avb_pvalue.c
@@ -134,5 +134,5 @@ BAREBOX_CMD_START(avb_pvalue)
BAREBOX_CMD_DESC("AVB persistent variable store")
BAREBOX_CMD_OPTS("[-rwf] [VARNAME/VALUE]")
BAREBOX_CMD_HELP(cmd_avb_pvalue_help)
- BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
+ BAREBOX_CMD_GROUP(CMD_GRP_SECURITY)
BAREBOX_CMD_END
diff --git a/commands/blobgen.c b/commands/blobgen.c
index 8ff2cc2c1142..4bbbc24b3b6d 100644
--- a/commands/blobgen.c
+++ b/commands/blobgen.c
@@ -118,6 +118,6 @@ BAREBOX_CMD_START(blobgen)
.cmd = do_blobgen,
BAREBOX_CMD_DESC("en/decrypt blobs")
BAREBOX_CMD_OPTS("[-edmVb] <plaintext/ciphertext>")
- BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
+ BAREBOX_CMD_GROUP(CMD_GRP_SECURITY)
BAREBOX_CMD_HELP(cmd_blobgen_help)
BAREBOX_CMD_END
diff --git a/commands/help.c b/commands/help.c
index ba8542b90f01..6851c652ac09 100644
--- a/commands/help.c
+++ b/commands/help.c
@@ -59,6 +59,7 @@ static void list_commands(int verbose)
list_group(verbose, "Console", CMD_GRP_CONSOLE);
list_group(verbose, "Memory", CMD_GRP_MEM);
list_group(verbose, "Hardware manipulation", CMD_GRP_HWMANIP);
+ list_group(verbose, "Security", CMD_GRP_SECURITY);
list_group(verbose, "Miscellaneous", CMD_GRP_MISC);
list_group(verbose, "Ungrouped", 0);
printf("Use 'help COMMAND' for more details.\n\n");
diff --git a/commands/keystore.c b/commands/keystore.c
index 8679a840e8d9..fe5cede951f3 100644
--- a/commands/keystore.c
+++ b/commands/keystore.c
@@ -97,6 +97,6 @@ BAREBOX_CMD_START(keystore)
.cmd = do_keystore,
BAREBOX_CMD_DESC("manage keys")
BAREBOX_CMD_OPTS("[-rsf] <keyname>")
- BAREBOX_CMD_GROUP(CMD_GRP_MISC)
+ BAREBOX_CMD_GROUP(CMD_GRP_SECURITY)
BAREBOX_CMD_HELP(cmd_keystore_help)
BAREBOX_CMD_END
diff --git a/include/command.h b/include/command.h
index 03ac270d1305..378e1458a589 100644
--- a/include/command.h
+++ b/include/command.h
@@ -79,7 +79,8 @@ static inline int run_command(const char *cmd) { return -ENOSYS; }
#define CMD_GRP_CONSOLE 8
#define CMD_GRP_MEM 9
#define CMD_GRP_HWMANIP 10
-#define CMD_GRP_MISC 11
+#define CMD_GRP_SECURITY 11
+#define CMD_GRP_MISC 12
#endif /* __ASSEMBLY__ */
--
2.39.5
More information about the barebox
mailing list