From 19a073db9bd45ccb9d1daaca0c1aa550fcb4fc31 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Oct 2018 16:42:30 +0200 Subject: [PATCH 1/2] journalctl: drop --new-id128 from help and man texts Let's remove redundancy and not advertise "journalctl --new-id128" anymore, now that we have "systemd-id128 new" in a proper tool. This allows us to reduce the overly large journalctl command set a bit. Note that this just removes the --help and man text, the call remains available for compat reasons. --- man/journalctl.xml | 12 ------------ src/journal/journalctl.c | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/man/journalctl.xml b/man/journalctl.xml index a4f9e2d7ee..91461a7732 100644 --- a/man/journalctl.xml +++ b/man/journalctl.xml @@ -705,18 +705,6 @@ - - - - Instead of showing journal contents, generate - a new 128-bit ID suitable for identifying messages. This is - intended for usage by developers who need a new identifier for - a new message they introduce and want to make - recognizable. This will print the new ID in four different - formats which can be copied into source code or similar. - - - diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index a9e4af1dd8..12d2559509 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -362,7 +362,6 @@ static int help(void) { " --list-catalog Show all message IDs in the catalog\n" " --dump-catalog Show entries in the message catalog\n" " --update-catalog Update the message catalog database\n" - " --new-id128 Generate a new 128-bit ID\n" " --setup-keys Generate a new FSS key pair\n" "\nSee the %s for details.\n" , program_invocation_short_name @@ -424,7 +423,7 @@ static int parse_argv(int argc, char *argv[]) { { "no-full", no_argument, NULL, ARG_NO_FULL }, { "lines", optional_argument, NULL, 'n' }, { "no-tail", no_argument, NULL, ARG_NO_TAIL }, - { "new-id128", no_argument, NULL, ARG_NEW_ID128 }, + { "new-id128", no_argument, NULL, ARG_NEW_ID128 }, /* deprecated */ { "quiet", no_argument, NULL, 'q' }, { "merge", no_argument, NULL, 'm' }, { "this-boot", no_argument, NULL, ARG_THIS_BOOT }, /* deprecated */ From b9d016d6848fdd00717166f67bfea257a445ba78 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Oct 2018 16:43:54 +0200 Subject: [PATCH 2/2] tree-wide: drop all references to "journalctl --new-id128" Let's advertise "systemd-id128 new" instead. --- man/sd-id128.xml | 4 ++-- man/sd_id128_randomize.xml | 6 +++--- man/systemd.journal-fields.xml | 12 ++++-------- src/systemd/sd-messages.h | 8 +++----- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/man/sd-id128.xml b/man/sd-id128.xml index fbcf4bf367..4425c45d1e 100644 --- a/man/sd-id128.xml +++ b/man/sd-id128.xml @@ -141,8 +141,8 @@ int main(int argc, char **argv) { } Note that new, randomized IDs may be generated with - journalctl1's - option. + systemd-id1281's + new command. diff --git a/man/sd_id128_randomize.xml b/man/sd_id128_randomize.xml index 4f7cd71398..4f5b160bd9 100644 --- a/man/sd_id128_randomize.xml +++ b/man/sd_id128_randomize.xml @@ -52,9 +52,9 @@ type, see sd-id1283. - journalctl1's - option may be used as a command line - front-end for sd_id128_randomize(). + systemd-id1281's + new command may be used as a command line front-end for + sd_id128_randomize(). diff --git a/man/systemd.journal-fields.xml b/man/systemd.journal-fields.xml index 942c6ba91a..76e1de72ca 100644 --- a/man/systemd.journal-fields.xml +++ b/man/systemd.journal-fields.xml @@ -56,14 +56,10 @@ MESSAGE_ID= - A 128-bit message identifier ID for recognizing - certain message types, if this is desirable. This should - contain a 128-bit ID formatted as a lower-case hexadecimal - string, without any separating dashes or suchlike. This is - recommended to be a UUID-compatible ID, but this is not - enforced, and formatted differently. Developers can generate - a new ID for this purpose with journalctl - . + A 128-bit message identifier ID for recognizing certain message types, if this is desirable. This + should contain a 128-bit ID formatted as a lower-case hexadecimal string, without any separating dashes or + suchlike. This is recommended to be a UUID-compatible ID, but this is not enforced, and formatted + differently. Developers can generate a new ID for this purpose with systemd-id128 new. diff --git a/src/systemd/sd-messages.h b/src/systemd/sd-messages.h index 2f0e8966ab..ba6c6b1cf8 100644 --- a/src/systemd/sd-messages.h +++ b/src/systemd/sd-messages.h @@ -23,12 +23,10 @@ _SD_BEGIN_DECLARATIONS; -/* Hey! If you add a new message here, you *must* also update the - * message catalog with an appropriate explanation */ +/* Hey! If you add a new message here, you *must* also update the message catalog with an appropriate explanation */ -/* And if you add a new ID here, make sure to generate a random one - * with journalctl --new-id128. Do not use any other IDs, and do not - * count them up manually. */ +/* And if you add a new ID here, make sure to generate a random one with "systemd-id128 new". Do not use any other IDs, + * and do not count them up manually. */ #define SD_MESSAGE_JOURNAL_START SD_ID128_MAKE(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,5a,77,7b) #define SD_MESSAGE_JOURNAL_START_STR SD_ID128_MAKE_STR(f7,73,79,a8,49,0b,40,8b,be,5f,69,40,50,5a,77,7b)