Stop the VESA driver from whining loudly in the dmesg during boot on

systems that use EFI instead of BIOS.
This commit is contained in:
Scott Long 2019-11-13 15:31:31 +00:00
parent b3a25d2993
commit 2058e7dbde
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354683

View File

@ -1935,6 +1935,12 @@ vesa_load(void)
if (error == 0)
vesa_bios_info(bootverbose);
/* Don't return ENODEV, the upper layers will whine. */
if (error == ENODEV) {
error = 0;
vesa_adp = NULL;
}
return (error);
}
@ -1943,8 +1949,12 @@ vesa_unload(void)
{
int error;
/* The driver never initialized, so make it easy to unload. */
if (vesa_adp == NULL)
return (0);
/* if the adapter is currently in a VESA mode, don't unload */
if ((vesa_adp != NULL) && VESA_MODE(vesa_adp->va_mode))
if (VESA_MODE(vesa_adp->va_mode))
return (EBUSY);
/*
* FIXME: if there is at least one vty which is in a VESA mode,