]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vconsole-setup: reword error messages
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 19 Nov 2024 13:57:32 +0000 (14:57 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 25 Mar 2025 09:17:05 +0000 (10:17 +0100)
I was looking at some logs, and — without context —
"Setting source virtual console failed" doesn't make sense. It's a source
internally in vconsole-setup because we configure it and then use it to copy
the settings to other consoles. But at the point this message is emitted it's
not yet a source of anything. Also, "setting" sounds like we'd like to assign
it somewhere, which is even more confusing. Reword the messages to be more
down-to-earth and meaningful without looking at the code.

src/vconsole/vconsole-setup.c

index 7142405657578fe59ddb6def0e3f44684ab4b3eb..131bd41c72cbd338ed3d5b3cbc4fae667dacf624 100644 (file)
@@ -607,7 +607,7 @@ static int run(int argc, char **argv) {
         } else {
                 fd = find_source_vc(&vc, &idx);
                 if (fd < 0 && fd != -EBUSY)
-                        return log_error_errno(fd, "No usable source console found: %m");
+                        return log_error_errno(fd, "No virtual console that can be configured found: %m");
         }
 
         utf8 = is_locale_utf8();
@@ -617,7 +617,7 @@ static int run(int argc, char **argv) {
                 /* We found only busy VCs, which might happen during the boot process when the boot splash is
                  * displayed on the only allocated VC. In this case we don't interfere and avoid initializing
                  * the VC partially as some operations are likely to fail. */
-                log_notice("All allocated VCs are currently busy, skipping initialization of font and keyboard settings.");
+                log_notice("All allocated virtual consoles are busy, will not configure key mapping and font.");
                 return EXIT_SUCCESS;
         }
 
@@ -641,7 +641,7 @@ static int run(int argc, char **argv) {
                         setup_remaining_vcs(fd, idx, utf8);
                 else
                         log_full(r == EX_OSERR ? LOG_NOTICE : LOG_WARNING,
-                                 "Setting source virtual console failed, ignoring remaining ones.");
+                                 "Configuration of first virtual console failed, ignoring remaining ones.");
         }
 
         return IN_SET(r, 0, EX_OSERR) && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;