From 7304deaec1ed27567dd6c55e245d9d5cc99686bb Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 5 Aug 2015 10:44:03 +0200 Subject: pc, pc64: remove unused psaux driver, cleanup devkbd the psaux driver is not used in any kernel configuration and theres no userspace mouse daemon. i8042auxcmds() is wrong as access to the user buffer can fault and we are holding an ilocks. little cleanups in devkbd. --- sys/src/9/pc/devkbd.c | 27 +++++------------------- sys/src/9/pc/fns.h | 1 - sys/src/9/pc/psaux.c | 57 --------------------------------------------------- sys/src/9/pc64/fns.h | 1 - 4 files changed, 5 insertions(+), 81 deletions(-) delete mode 100644 sys/src/9/pc/psaux.c diff --git a/sys/src/9/pc/devkbd.c b/sys/src/9/pc/devkbd.c index 96baab79f..5aeaded1f 100644 --- a/sys/src/9/pc/devkbd.c +++ b/sys/src/9/pc/devkbd.c @@ -159,24 +159,6 @@ i8042auxcmd(int cmd) return 0; } -int -i8042auxcmds(uchar *cmd, int ncmd) -{ - int i; - - ilock(&i8042lock); - for(i=0; i -#include -#include -#include "screen.h" - -/* - * BUG: we ignore shift here. - * we need a more general solution, - * one that will also work for serial mice. - */ -Queue *psauxq; - -static void -psauxputc(int c, int) -{ - uchar uc; - - uc = c; - qproduce(psauxq, &uc, 1); -} - -static long -psauxread(Chan*, void *a, long n, vlong) -{ - return qread(psauxq, a, n); -} - -static long -psauxwrite(Chan*, void *a, long n, vlong) -{ - return i8042auxcmds(a, n); -} - -void -psauxlink(void) -{ - psauxq = qopen(1024, Qcoalesce, 0, 0); - if(psauxq == nil) - panic("psauxlink"); - qnoblock(psauxq, 1); - i8042auxenable(psauxputc); - addarchfile("psaux", DMEXCL|0660, psauxread, psauxwrite); -} diff --git a/sys/src/9/pc64/fns.h b/sys/src/9/pc64/fns.h index 5cbef27aa..1d92109cd 100644 --- a/sys/src/9/pc64/fns.h +++ b/sys/src/9/pc64/fns.h @@ -49,7 +49,6 @@ void guesscpuhz(int); void halt(void); void mwait(void*); int i8042auxcmd(int); -int i8042auxcmds(uchar*, int); void i8042auxenable(void (*)(int, int)); void i8042reset(void); void i8250console(void); -- cgit v1.2.3