From 4f176f24d6132ae2c0bdc7b35d6acece29fedb31 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 15 Sep 2024 03:18:32 +0900 Subject: [PATCH 1/4] creds: drop unnecessary include of build-path.h Follow-up for 58e359604ffdca12bb4d2c5807b96e070611c0f6. --- src/creds/creds.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/creds/creds.c b/src/creds/creds.c index 2e28ff3e0a..56e23caa7a 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -7,7 +7,6 @@ #include "sd-varlink.h" #include "build.h" -#include "build-path.h" #include "bus-polkit.h" #include "creds-util.h" #include "dirent-util.h" From acdfb85d97d62167ff8aa91a33bbd4d9b9cec262 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 15 Sep 2024 03:19:21 +0900 Subject: [PATCH 2/4] creds: align table --- src/creds/creds.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/creds/creds.c b/src/creds/creds.c index 56e23caa7a..5218f66eca 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -69,11 +69,11 @@ STATIC_DESTRUCTOR_REGISTER(arg_tpm2_public_key, freep); STATIC_DESTRUCTOR_REGISTER(arg_tpm2_signature, freep); static const char* transcode_mode_table[_TRANSCODE_MAX] = { - [TRANSCODE_OFF] = "off", - [TRANSCODE_BASE64] = "base64", + [TRANSCODE_OFF] = "off", + [TRANSCODE_BASE64] = "base64", [TRANSCODE_UNBASE64] = "unbase64", - [TRANSCODE_HEX] = "hex", - [TRANSCODE_UNHEX] = "unhex", + [TRANSCODE_HEX] = "hex", + [TRANSCODE_UNHEX] = "unhex", }; DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(transcode_mode, TranscodeMode); From 6c38915d351285dd269638987938046d581a9187 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 15 Sep 2024 03:20:53 +0900 Subject: [PATCH 3/4] creds: add short comment that has-tpm2 is moved Follow-up for 58e359604ffdca12bb4d2c5807b96e070611c0f6. --- src/creds/creds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creds/creds.c b/src/creds/creds.c index 5218f66eca..3d9510c99f 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -1046,7 +1046,7 @@ static int creds_main(int argc, char *argv[]) { { "decrypt", 2, 3, 0, verb_decrypt }, { "setup", VERB_ANY, 1, 0, verb_setup }, { "help", VERB_ANY, 1, 0, verb_help }, - { "has-tpm2", VERB_ANY, 1, 0, verb_has_tpm2 }, + { "has-tpm2", VERB_ANY, 1, 0, verb_has_tpm2 }, /* for backward compatibility */ {} }; From 60b2ddc9b7e432fe7c178edc8f283ef0ab6d18ce Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 15 Sep 2024 03:21:41 +0900 Subject: [PATCH 4/4] creds: move -h/--help and --version to correct section in the help message --- src/creds/creds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creds/creds.c b/src/creds/creds.c index 3d9510c99f..b55c60775c 100644 --- a/src/creds/creds.c +++ b/src/creds/creds.c @@ -714,9 +714,9 @@ static int verb_help(int argc, char **argv, void *userdata) { " ciphertext credential file\n" " decrypt INPUT [OUTPUT] Decrypt ciphertext credential file and write to\n" " plaintext credential file\n" + "\n%3$sOptions:%4$s\n" " -h --help Show this help\n" " --version Show package version\n" - "\n%3$sOptions:%4$s\n" " --no-pager Do not pipe output into a pager\n" " --no-legend Do not show the headers and footers\n" " --json=pretty|short|off\n"