Module Name: xsrc
Committed By: macallan
Date: Mon Apr 18 23:30:11 UTC 2011
Modified Files:
xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_kbd.c kbd.c
Log Message:
be less braindead about the Device option - only default to /dev/wskbd if
Protocol is set to wskbd. Now Protocol "standard" should work again.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.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/xf86-input-keyboard/dist/src/bsd_kbd.c
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.11 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.12
--- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.11 Mon Nov 22 07:29:09 2010
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c Mon Apr 18 23:30:11 2011
@@ -383,20 +383,18 @@
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
xfree(s);
- s = xf86SetStrOption(pInfo->options, "Device", NULL);
+ if (prot == PROT_WSCONS) {
+ s = xf86SetStrOption(pInfo->options, "Device", "/dev/wskbd");
+ } else
+ s = xf86SetStrOption(pInfo->options, "Device", NULL);
+
if (s == NULL) {
- if (prot == PROT_WSCONS) {
- xf86Msg(X_ERROR,"A \"device\" option is required with"
- " the \"wskbd\" keyboard protocol\n");
- return FALSE;
- } else {
- pInfo->fd = xf86Info.consoleFd;
- pKbd->isConsole = TRUE;
- pKbd->consType = xf86Info.consType;
- }
+ pInfo->fd = xf86Info.consoleFd;
+ pKbd->isConsole = TRUE;
+ pKbd->consType = xf86Info.consType;
} else {
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
- if (pInfo->fd == -1) {
+ if (pInfo->fd == -1) {
xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
xfree(s);
return FALSE;
Index: xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c
diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.2 xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.3
--- xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c:1.2 Wed Apr 13 16:23:29 2011
+++ xsrc/external/mit/xf86-input-keyboard/dist/src/kbd.c Mon Apr 18 23:30:11 2011
@@ -80,7 +80,6 @@
static const char *kbdDefaults[] = {
#ifdef __NetBSD__
"Protocol", "wskbd",
- "Device", "/dev/wskbd",
#else /* NetBSD */
#ifdef XQUEUE
"Protocol", "Xqueue",