From owner-svn-src-head@freebsd.org Wed May 3 19:53:02 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74E9FD58A6F; Wed, 3 May 2017 19:53:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46DD8279; Wed, 3 May 2017 19:53:02 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v43Jr1Rm035870; Wed, 3 May 2017 19:53:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v43Jr1SM035869; Wed, 3 May 2017 19:53:01 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201705031953.v43Jr1SM035869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 3 May 2017 19:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317758 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 May 2017 19:53:02 -0000 Author: asomers Date: Wed May 3 19:53:01 2017 New Revision: 317758 URL: https://svnweb.freebsd.org/changeset/base/317758 Log: Unbreak ifconfig for mlx4en(4) after r317755 ifconfig doesn't correctly infer mlx interfaces' module names, so it will attempt to load the mlx(4) module even when not necessary. Reported by: rstone MFC after: 3 weeks X-MFC-With: 317755 Sponsored by: Spectra Logic Corp Modified: head/sbin/ifconfig/ifconfig.c Modified: head/sbin/ifconfig/ifconfig.c ============================================================================== --- head/sbin/ifconfig/ifconfig.c Wed May 3 18:46:33 2017 (r317757) +++ head/sbin/ifconfig/ifconfig.c Wed May 3 19:53:01 2017 (r317758) @@ -1374,9 +1374,11 @@ ifmaybeload(const char *name) } } - /* not present, we should try to load it */ - if (kldload(ifkind) < 0) - err(1, "kldload(%s)", ifkind); + /* + * Try to load the module. But ignore failures, because ifconfig can't + * infer the names of all drivers (eg mlx4en(4)). + */ + (void) kldload(ifkind); } static struct cmd basic_cmds[] = {