diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index 463adfdca7..fafbb9ecbb 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -282,4 +282,10 @@ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn); #define xf86MsgVerb LogMessageVerb #define xf86Msg(type, ...) LogMessageVerb(type, 1, __VA_ARGS__) +/* + * retrieve file descriptor to opened console device. + * only for some legacy keyboard drivers (xf86-input-keyboard) + */ +_X_EXPORT int xf86GetConsoleFd(void); + #endif /* _XF86_H */ diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 58e20dcde3..371b851443 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -195,3 +195,8 @@ Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif Bool xorgHWAccess = FALSE; + +int xf86GetConsoleFd(void) +{ + return xf86Info.consoleFd; +}