]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: use new red/green check/cross mark helpers at two places
authorLennart Poettering <lennart@poettering.net>
Tue, 23 Nov 2021 13:08:01 +0000 (14:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Nov 2021 21:40:15 +0000 (22:40 +0100)
src/boot/bootctl.c
src/test/test-gpt.c

index c19a51de6268deaf202979507f7a76269cd56bd1..07ad949a0c69589894515800eac3128c5ca8744e 100644 (file)
@@ -1240,11 +1240,9 @@ static void read_efi_var(const char *variable, char **ret) {
 }
 
 static void print_yes_no_line(bool first, bool good, const char *name) {
-        printf("%s%s%s%s %s\n",
+        printf("%s%s %s\n",
                first ? "     Features: " : "               ",
-               ansi_highlight_green_red(good),
-               special_glyph_check_mark(good),
-               ansi_normal(),
+               COLOR_MARK_BOOL(good),
                name);
 }
 
index 9b0eb57373df6294b4fd223426d10d1381ccf6e6..7ee044ba50c4fbebee4cf41ad6cab5293f289889 100644 (file)
@@ -4,6 +4,7 @@
 #include "glyph-util.h"
 #include "gpt.h"
 #include "log.h"
+#include "pretty-print.h"
 #include "strv.h"
 #include "terminal-util.h"
 #include "tests.h"
@@ -32,11 +33,11 @@ static void test_gpt_types_against_architectures(void) {
 
                                 r = gpt_partition_type_uuid_from_string(joined, &id);
                                 if (r < 0) {
-                                        printf("%s%s%s %s\n", ansi_highlight_red(), special_glyph(SPECIAL_GLYPH_CROSS_MARK), ansi_normal(), joined);
+                                        printf("%s %s\n", RED_CROSS_MARK(), joined);
                                         continue;
                                 }
 
-                                printf("%s%s%s %s\n", ansi_highlight_green(), special_glyph(SPECIAL_GLYPH_CHECK_MARK), ansi_normal(), joined);
+                                printf("%s %s\n", GREEN_CHECK_MARK(), joined);
 
                                 if (streq(prefix, "root-") && streq(suffix, ""))
                                         assert_se(gpt_partition_type_is_root(id));