Date: Fri, 13 Feb 2009 16:16:16 -0800 From: Maksim Yevmenkin <emax@freebsd.org> To: Andrew Thompson <thompsa@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r188603 - head/sys/dev/kbdmux Message-ID: <bb4a86c70902131616s7566a4d3h1f142e66beb63474@mail.gmail.com> In-Reply-To: <200902132336.n1DNa8s5002205@svn.freebsd.org> References: <200902132336.n1DNa8s5002205@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 13, 2009 at 3:36 PM, Andrew Thompson <thompsa@freebsd.org> wrote: > Author: thompsa > Date: Fri Feb 13 23:36:08 2009 > New Revision: 188603 > URL: http://svn.freebsd.org/changeset/base/188603 > > Log: > Since r188030 the error value for attach is returned, this means if kbdmux > fails to attach (possibly due to disable hints) then we get called back for > unload. Correctly handle the case where the keyboard isnt found rather than > calling panic. thanks for taking care of this! thanks, max > > Modified: > head/sys/dev/kbdmux/kbdmux.c > > Modified: head/sys/dev/kbdmux/kbdmux.c > ============================================================================== > --- head/sys/dev/kbdmux/kbdmux.c Fri Feb 13 22:48:05 2009 (r188602) > +++ head/sys/dev/kbdmux/kbdmux.c Fri Feb 13 23:36:08 2009 (r188603) > @@ -1346,15 +1346,14 @@ kbdmux_modevent(module_t mod, int type, > panic("kbd_get_switch(" KEYBOARD_NAME ") == NULL"); > > kbd = kbd_get_keyboard(kbd_find_keyboard(KEYBOARD_NAME, 0)); > - if (kbd == NULL) > - panic("kbd_get_keyboard(kbd_find_keyboard(" KEYBOARD_NAME ", 0)) == NULL"); > - > - (*sw->disable)(kbd); > + if (kbd != NULL) { > + (*sw->disable)(kbd); > #ifdef KBD_INSTALL_CDEV > - kbd_detach(kbd); > + kbd_detach(kbd); > #endif > - (*sw->term)(kbd); > - kbd_delete_driver(&kbdmux_kbd_driver); > + (*sw->term)(kbd); > + kbd_delete_driver(&kbdmux_kbd_driver); > + } > error = 0; > break; > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70902131616s7566a4d3h1f142e66beb63474>