xfree86: os-support: bsd: scope "vtmode" in xf86OpenConsole()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-13 14:39:50 +01:00
committed by Enrico Weigelt
parent fd5cd094d1
commit e814acf006

View File

@@ -148,11 +148,6 @@ xf86OpenConsole(void)
int i, fd = -1;
xf86ConsOpen_t *driver;
#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
vtmode_t vtmode;
#endif
if (serverGeneration == 1) {
/* If libseat is in control, it handles VT switching. */
@@ -245,10 +240,13 @@ acquire_vt:
OsSignal(SIGUSR1, xf86VTRequest);
vtmode.mode = VT_PROCESS;
vtmode.relsig = SIGUSR1;
vtmode.acqsig = SIGUSR1;
vtmode.frsig = SIGUSR1;
vtmode_t vtmode = {
.mode = VT_PROCESS,
.relsig = SIGUSR1,
.acqsig = SIGUSR1,
.frsig = SIGUSR1
};
if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0) {
FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed");
}