Date: Mon, 23 Jul 2018 06:38:49 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336627 - head/stand/efi/loader Message-ID: <201807230638.w6N6cnsf076857@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Mon Jul 23 06:38:48 2018 New Revision: 336627 URL: https://svnweb.freebsd.org/changeset/base/336627 Log: 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. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Jul 23 06:04:05 2018 (r336626) +++ head/stand/efi/loader/main.c Mon Jul 23 06:38:48 2018 (r336627) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807230638.w6N6cnsf076857>