diff options
-rw-r--r-- | driver/xf86-input-keyboard/src/bsd_kbd.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/driver/xf86-input-keyboard/src/bsd_kbd.c b/driver/xf86-input-keyboard/src/bsd_kbd.c index 912879a2b..a0ad19586 100644 --- a/driver/xf86-input-keyboard/src/bsd_kbd.c +++ b/driver/xf86-input-keyboard/src/bsd_kbd.c @@ -385,7 +385,7 @@ WSReadInput(InputInfoPtr pInfo) static void printWsType(char *type, char *devname) { - xf86Msg(X_PROBED, "%s: Keyboard type: %s\n", type, devname); + xf86Msg(X_PROBED, "%s: Keyboard type: %s\n", devname, type); } #endif @@ -434,7 +434,11 @@ OpenKeyboard(InputInfoPtr pInfo) pKbd->consType = xf86Info.consType; } } else { - pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL); +#ifndef X_PRIVSEP + pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL); +#else + pInfo->fd = priv_open_device(s); +#endif if (pInfo->fd == -1) { xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s); xfree(s); @@ -471,7 +475,7 @@ OpenKeyboard(InputInfoPtr pInfo) printWsType("USB", pInfo->name); break; #ifdef WSKBD_TYPE_ADB - case WSKBD_TYPE_ADB: + case WSKBD_TYPE_ADB: printWsType("ADB", pInfo->name); break; #endif @@ -481,10 +485,16 @@ OpenKeyboard(InputInfoPtr pInfo) break; #endif #ifdef WSKBD_TYPE_SUN5 - case WSKBD_TYPE_SUN5: - xf86Msg(X_PROBED, "Keyboard type: Sun5\n"); - break; + case WSKBD_TYPE_SUN5: + printWsType("Sun5", pInfo->name); + break; #endif + case WSKBD_TYPE_LK201: + printWsType("LK-201", pInfo->name); + break; + case WSKBD_TYPE_LK401: + printWsType("LK-401", pInfo->name); + break; default: xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"", pInfo->name, pKbd->wsKbdType); |