From nobody Fri Jan 20 17:24:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz5wF2W5jz2t4jw; Fri, 20 Jan 2023 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz5wF21Y6z4Gpr; Fri, 20 Jan 2023 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674235485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8B7SwqTTWP/VbhSHre2F0kEErZm6ast5+6Vn/wpli6U=; b=ljDW60ui9U5GYVfgvjUGSlMmMH0yF7+rFxmyd6pSLJh+j0iFuw8VxAKOBHgGz2m4eN863I zEAE1qa+5hF4s3ba1IseAcoN7eKfnIX7+rR/AyojVyDoP1/Uh7LhlReU5kmbQD+O6xhOc5 jT9nFnssGRUdOllO5niJ/EgYaqdIatGQDzIV7qzYDWBhGRXLWxqI7acNHLykSM2g9AYMrB SAqxw+vzwZyD88J1f3a9OrDVqE4WnxCAr7ToOpTXifZA7wufiQxDAYt0sSYBZMwr+GFCB6 1Pm2r/LOqmAvj7MC7voR9fbhCdoCzwUGW7gu++zCYIZrosdnJMfc6a9YCBz/zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674235485; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8B7SwqTTWP/VbhSHre2F0kEErZm6ast5+6Vn/wpli6U=; b=v2SUYzfBj4wCNlQVV9jDpSFxO4vSUyjFEtEr2+P+yNlig4jq727qqLctOvKPY40/bgJMim Z5NLzEALo7ow5LdSRPSWiQXTR7ksvVbknusbd0FANegXoQP3ND6mSr+sySrHPHOG71a72b UTj0Pxap2TpmzedcDZoOLsRSWHNs8H9TIoV0h27ZH/o+AGEfrmzq2zN6rsoTqp22qaSKzN AyFj5DwlBxBOydcocZm4hz+7p6JbDqbEWax7smgscq4sGj1tWrn3zwfo/ptnPLs6rbx1Iz 6+hJk78wIgWLo9Z3HTIJMyf2XeoFhuabvY6wC1lDhViz8i4SanAm1CaQeFsduw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674235485; a=rsa-sha256; cv=none; b=Ug6tWT9n+0Kcq+r0uKQkMO7SCEURGx3/D78fdDEFXz7KA8SESbNO17Qw5kHP1diiuGSdKU wWVLdJpb66tyB3zZXCIaK47lMhQm/6NDCxMuS9bKTr0ig0QU81QCjs0Y/lyBqVOGHcNenu skWNrXDfi/cFnLmxpuO7TlODRaogwBGJ1+uidQiJa7Gdiv4f9wRiHtsSijKhNFYt7wX/K6 2+E3ujuZrdggMZxJdfMwGOAL024E4bdtYqu9++BKrqIZ1EyfWGWweXZtn21UbdxSxeQnbG utgDPkChfJkoov2GSFkaDW7/nlFBso+ofuhY06MEto7x++ARgsPxi7sYwiMdWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nz5wF14ckzf5m; Fri, 20 Jan 2023 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30KHOj4b041593; Fri, 20 Jan 2023 17:24:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30KHOjEu041592; Fri, 20 Jan 2023 17:24:45 GMT (envelope-from git) Date: Fri, 20 Jan 2023 17:24:45 GMT Message-Id: <202301201724.30KHOjEu041592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 520590881667 - main - Revert "ifconfig: abort if loading a module fails other than for ENOENT" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 520590881667b4536e6861c710a80353a0564334 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=520590881667b4536e6861c710a80353a0564334 commit 520590881667b4536e6861c710a80353a0564334 Author: Alan Somers AuthorDate: 2023-01-20 17:17:21 +0000 Commit: Alan Somers CommitDate: 2023-01-20 17:17:21 +0000 Revert "ifconfig: abort if loading a module fails other than for ENOENT" This reverts commit 2c24ad3377a6f584e484656db8390e4eb7cfc119. This change causes some commands to fail, for example when working with renamed interfaces or when trying to list a nonexistent interface by name. PR: 269042 Reported by: dbaio, Michael Paepcke MFC with: 2c24ad3377a6f584e484656db8390e4eb7cfc119 --- sbin/ifconfig/ifconfig.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 120207a6927e..462d543125c4 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -1719,19 +1719,11 @@ ifmaybeload(const char *name) } } - /* Try to load the module. */ - if (kldload(ifkind) < 0) { - switch (errno) { - case ENOENT: - /* - * Ignore ENOENT, because ifconfig can't infer the - * names of all drivers (eg mlx4en(4)). - */ - break; - default: - 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[] = {