mirror of
https://github.com/X11Libre/xf86-video-vesa.git
synced 2026-03-24 09:35:46 +00:00
Refuse to run on UEFI machines
No possible good can come of this.
v2: Check for .../efi-framebuffer.0 ("is there an EFI framebuffer")
instead of /sys/firmware/efi ("is this an EFI machine"). Suggested by
Peter Jones.
Reviewed-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
11
src/vesa.c
11
src/vesa.c
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include "vesa.h"
|
||||
|
||||
/* All drivers initialising the SW cursor need this */
|
||||
@@ -450,7 +450,14 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci_device *dev,
|
||||
intptr_t match_data)
|
||||
{
|
||||
ScrnInfoPtr pScrn;
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
if (access("/sys/devices/platform/efi-framebuffer.0", F_OK) == 0) {
|
||||
ErrorF("vesa: Refusing to run on UEFI\n");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
if (pScrn != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user