Module Name: xsrc
Committed By: tsutsui
Date: Sun Aug 9 06:30:46 UTC 2020
Modified Files:
xsrc/external/mit/xorg-server/dist/hw/sun: sunInit.c
Log Message:
Inform detected keyboard type and layout via LogMessage().
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c
diff -u xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.4 xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c:1.4 Tue Aug 4 14:31:04 2020
+++ xsrc/external/mit/xorg-server/dist/hw/sun/sunInit.c Sun Aug 9 06:30:46 2020
@@ -526,7 +526,13 @@ OsVendorInit(void)
if (sunPtrPriv.fd < 0)
FatalError ("Cannot open /dev/mouse, error %d\n", errno);
getKbdType ();
- if (sunKbdPriv.type == KB_SUN4) {
+ switch (sunKbdPriv.type) {
+ case KB_SUN2:
+ case KB_SUN3:
+ LogMessage(X_INFO, "Sun type %d Keyboard\n", sunKbdPriv.type);
+ break;
+ case KB_SUN4:
+#define LAYOUT_US5 33
(void) ioctl (sunKbdPriv.fd, KIOCLAYOUT, &sunKbdPriv.layout);
if (sunKbdPriv.layout < 0 ||
sunKbdPriv.layout > sunMaxLayout ||
@@ -534,6 +540,12 @@ OsVendorInit(void)
FatalError ("Unsupported keyboard type 4 layout %d\n",
sunKbdPriv.layout);
sunKeySyms[KB_SUN4].map = sunType4KeyMaps[sunKbdPriv.layout];
+ LogMessage(X_INFO, "Sun type %d Keyboard, layout %d\n",
+ sunKbdPriv.layout >= LAYOUT_US5 ? 5 : 4, sunKbdPriv.layout);
+ break;
+ default:
+ LogMessage(X_INFO, "Unknown keyboard type\n");
+ break;
}
inited = 1;
}