On Fri, Jul 26, 2013 at 06:15:36PM -0700, Alan Coopersmith wrote: > On 07/26/13 02:24 PM, Thomas Klausner wrote: > >Only default to /dev/wskbd if Protocol is set to wskbd. Now Protocol > >"standard" should work again. > > > > From Michael Lorenz <[email protected]> > >Signed-off-by: Thomas Klausner <[email protected]> > >--- > > src/bsd_kbd.c | 20 +++++++++----------- > > 1 file changed, 9 insertions(+), 11 deletions(-) > > > >diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c > >index 6a3ca79..b9cca5f 100644 > >--- a/src/bsd_kbd.c > >+++ b/src/bsd_kbd.c > >@@ -359,20 +359,18 @@ OpenKeyboard(InputInfoPtr pInfo) > > } > > free(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); > >+ > > Minor style nit - it seems odd to bracket the first one-line else > clause but not the second. I personally tend towards bracketing > both, but I believe the current X.Org style recommendation would > bracket neither, as in: > > + if (prot == PROT_WSCONS) > + s = xf86SetStrOption(pInfo->options, "Device", "/dev/wskbd"); > + else > + s = xf86SetStrOption(pInfo->options, "Device", NULL);
Ok, changed. Thanks, Thomas
>From 18aa1611210238769ee712a62db46c677b57e2fd Mon Sep 17 00:00:00 2001 From: Thomas Klausner <[email protected]> Date: Fri, 26 Jul 2013 21:44:35 +0200 Subject: [PATCH:xf86-input-keyboard 15/21] Fix Protocol "standard". Only default to /dev/wskbd if Protocol is set to wskbd. Now Protocol "standard" should work again. >From Michael Lorenz <[email protected]> Signed-off-by: Thomas Klausner <[email protected]> --- src/bsd_kbd.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index b6235d7..d3c3748 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -359,20 +359,18 @@ OpenKeyboard(InputInfoPtr pInfo) } free(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); free(s); return FALSE; -- 1.8.3.3
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
