From 95d65cf6bb753d10f4db3d857fb98bb09389228e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 Jun 2004 04:50:21 +0000 Subject: [PATCH] Manual page X(7) does not reference Xprt(1x), xplsprinters(1x), etc. xc/config/cf/Imake.rules Correct comment to match rule name for InstallDriverSDKObjectModule xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c Log results of ioctls to probe keyboard type & layout --- hw/xfree86/os-support/solaris/sun_kbd.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hw/xfree86/os-support/solaris/sun_kbd.c b/hw/xfree86/os-support/solaris/sun_kbd.c index 0213a0732..a48b7f176 100644 --- a/hw/xfree86/os-support/solaris/sun_kbd.c +++ b/hw/xfree86/os-support/solaris/sun_kbd.c @@ -23,7 +23,9 @@ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* $XdotOrg:$ */ +#include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" @@ -55,6 +57,7 @@ void xf86KbdInit() { int klayout; + const char *ktype_name; if (xf86Info.kbdFd < 0) { xf86Info.kbdFd = open("/dev/kbd", O_RDWR|O_NONBLOCK); @@ -63,7 +66,7 @@ xf86KbdInit() } /* - * None of the followin should ever fail. If it does, something is + * None of the following should ever fail. If it does, something is * broken (IMO) - DWH 8/21/99 */ @@ -78,6 +81,21 @@ xf86KbdInit() if (ioctl(xf86Info.kbdFd, KIOCGDIRECT, &sun_odirect) < 0) FatalError("Unable to determine keyboard direct setting\n"); + + switch (sun_ktype) { + case KB_SUN3: + ktype_name = "Sun Type 3"; break; + case KB_SUN4: + ktype_name = "Sun Type 4/5/6"; break; + case KB_USB: + ktype_name = "USB"; break; + case KB_PC: + ktype_name = "PC"; break; + default: + ktype_name = "Unknown"; break; + } + xf86Msg(X_PROBED, "Keyboard type: %s (%d)\n", ktype_name, sun_ktype); + xf86Msg(X_PROBED, "Keyboard layout: %d\n", klayout); } int