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.
This commit is contained in:
Warner Losh 2018-07-23 06:38:48 +00:00
parent 3b74102205
commit afe7cf8749

View File

@ -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);