From: Arian van Putten Date: Tue, 30 May 2023 17:12:36 +0000 (+0200) Subject: bootctl: Print version number of detected binaries X-Git-Tag: v254-rc1~316^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80ed800df73b22376a5a2dc54181e20bb4a0a86b;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/boot/bootctl-status.c b/src/boot/bootctl-status.c index 3da64782590..0e4e87ae241 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();