From afe7cf8749ae61fed65980d10817252a2c2b7677 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 23 Jul 2018 06:38:48 +0000 Subject: [PATCH] Fix the attempt to see if we're overriding the console in the command line args. I had thought console would be NULL, but it's efi. Set it to efi (as a clue) before we initialize the console, then test it to see if it changed on the command line to do the automatic override. This gets my serial console back. --- stand/efi/loader/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 772388af52f3..4166371b33b1 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -567,6 +567,7 @@ main(int argc, CHAR16 *argv[]) * eg. the boot device, which we can't do yet. We can use * printf() etc. once this is done. */ + setenv("console", "efi", 1); cons_probe(); /* @@ -589,7 +590,7 @@ main(int argc, CHAR16 *argv[]) #define VID_SER_BOTH RB_MULTIPLE #define SER_VID_BOTH (RB_SERIAL | RB_MULTIPLE) #define CON_MASK (RB_SERIAL | RB_MULTIPLE) - if (getenv("console") == NULL) { + if (strcmp(getenv("console"), "efi") == 0) { if ((howto & CON_MASK) == 0) { /* No override, uhowto is controlling and efi cons is perfect */ howto = howto | (uhowto & CON_MASK);