From owner-svn-src-all@FreeBSD.ORG Sat Feb 14 00:16:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8975106564A; Sat, 14 Feb 2009 00:16:17 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 471C08FC1A; Sat, 14 Feb 2009 00:16:16 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by yw-out-2324.google.com with SMTP id 2so825241ywt.13 for ; Fri, 13 Feb 2009 16:16:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=EjISpsorA3OhIJV2l6UPMtBcvHz9uid3E3AyGF6weKQ=; b=GmpVRhrx2gE976jKXj5Plq31x9H3l3JJFrXzQwT0vhNXRwdXjO7rjQg4+2ynCmte4Y Pje/vKSuTSSOzhPm8QGJoGvCz6bL8uxHk3p6HSMy5PErPrHtWa8b5b09l0INGVM3eQdd B621FBLAXBzHQdPC3cRPUIRJHi4jcTpgPtVfw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=fZJq63RdA/u0bWDMFSafea7dW0/L70t8EzizlOanzsCWafFq0oSpuGlegp0dCVuhN+ aj5kc+VwfSmriobRqORBOvJfUrHTiciOg55KYGNaBX8PknWwv+2s3iknIYXD9xVgB2Nr glpYo4OJkYhCI8LAeNfzTY5OJRm/ISBuf2XQU= MIME-Version: 1.0 Sender: maksim.yevmenkin@gmail.com Received: by 10.150.91.4 with SMTP id o4mr690598ybb.37.1234570576424; Fri, 13 Feb 2009 16:16:16 -0800 (PST) In-Reply-To: <200902132336.n1DNa8s5002205@svn.freebsd.org> References: <200902132336.n1DNa8s5002205@svn.freebsd.org> Date: Fri, 13 Feb 2009 16:16:16 -0800 X-Google-Sender-Auth: 46f0ead6a9664784 Message-ID: From: Maksim Yevmenkin To: Andrew Thompson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r188603 - head/sys/dev/kbdmux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2009 00:16:18 -0000 On Fri, Feb 13, 2009 at 3:36 PM, Andrew Thompson 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; > >