From 80ed800df73b22376a5a2dc54181e20bb4a0a86b Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Tue, 30 May 2023 19:12:36 +0200 Subject: [PATCH] bootctl: Print version number of detected binaries In 9b9f6aa41204c995b7a3b3e99c50e92b0a8b3dde (#27069) we changed get_file_version to return 0 instead of 1 on success. However we did not update the printing of the version number to handle this change so we would never print the version number. --- src/boot/bootctl-status.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/boot/bootctl-status.c b/src/boot/bootctl-status.c index 3da6478259..0e4e87ae24 100644 --- a/src/boot/bootctl-status.c +++ b/src/boot/bootctl-status.c @@ -243,10 +243,7 @@ static int enumerate_binaries( /* Do not output this entry immediately, but store what should be printed in a state * variable, because we only will know the tree glyph to print (branch or final edge) once we * read one more entry */ - if (r > 0) - r = asprintf(previous, "/%s/%s (%s%s%s)", path, de->d_name, ansi_highlight(), v, ansi_normal()); - else - r = asprintf(previous, "/%s/%s", path, de->d_name); + r = asprintf(previous, "/%s/%s (%s%s%s)", path, de->d_name, ansi_highlight(), v, ansi_normal()); if (r < 0) return log_oom(); -- 2.25.1