Bail out on failing the read(). This happens when a USB mouse is

disconnected. We retry the open in the parent subroutine.

Remove an ifdef _i386_ . MOUSE_IF_USB is now defined for alpha as well.

Reviewed-By:    yokota
This commit is contained in:
Nick Hibma 1999-11-29 17:21:07 +00:00
parent df9349420e
commit d009bdaeb7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53886

View File

@ -174,9 +174,7 @@ static symtab_t rifs[] = {
{ "inport", MOUSE_IF_INPORT },
{ "ps/2", MOUSE_IF_PS2 },
{ "sysmouse", MOUSE_IF_SYSMOUSE },
#ifdef __i386__
{ "usb", MOUSE_IF_USB },
#endif /* __i386__ */
{ NULL, MOUSE_IF_UNKNOWN },
};
@ -748,7 +746,9 @@ moused(void)
}
/* mouse event */
read(rodent.mfd, &b, 1);
if (read(rodent.mfd, &b, 1) == -1);
return; /* file seems to be closed on us */
if (r_protocol(b, &action)) { /* handler detected action */
r_map(&action, &action2);
debug("activity : buttons 0x%08x dx %d dy %d dz %d",