From nobody Tue Dec 17 20:54:41 2024 X-Original-To: dev-commits-src-main@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 4YCTZn3K97z5hjLH; Tue, 17 Dec 2024 20:54:41 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCTZn2nQ1z4fPx; Tue, 17 Dec 2024 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734468881; 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=GL7ZZNN/7kSbccsydGsdsNBh75xv3XyfShAx/jNl6k0=; b=VhXmMiEdLMJl6JlCbGx+0HCh+rDqvuDswQQsWQickqIZxGrsK3FaFWgpW/pVt0a7fuvSsl qOgNBpQZOpUfYnjsG2JT+F/w4SJEbZ7Fl7ZBCnBLbFU8oICxK39QDPuqGzhKiaXLmGSeYN eaofaMisZvmeC7dCJA1WrT+jxivcmS7JwpWo1tlA8kS4UlszOQBb2/Q1sruTyOkD1NFHuU Lu99cUcJGeRkwz1qsS1vI299LRKa6zjbDReb6ANcYuI+w/lG58FdY5UCeMVlkyeR3rUUJh 4rvfRopKrv6fPR6HpPSWbbHil3lcxMpFX4TtrDcigN8WZ7HylbAY80pIxjdaWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734468881; 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=GL7ZZNN/7kSbccsydGsdsNBh75xv3XyfShAx/jNl6k0=; b=aZXYF/WhZyK9JYccID5V9kAwXxcB+c180yjEzgwBtO+Z377epw2VFe19NkJSOzG+5HTTQK 1plpjDscB6pN3a3WDT73K/JDU50qO1eBw43tPbnPUsYydud2ZRfX1l0kjRb6ksxnzf3Quz ydbgZRrDqw0eNHmeN2GrEReWPmcgYdQio6E/CD5F0gyEwQhPWkgIErPJBR6h9Sz8IFWwGe 8C+wlzIpsaJYE8wZqBQ28d6nwa7ZGjo2p0S1RvNSviBuSS4TrWS+521EzE/2RWgBm8QZul eHj1AbkUERji7ar3E71qq2h9f2WyQCaoIxWqWLQysped5P5zemLLZ424wsPLLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734468881; a=rsa-sha256; cv=none; b=xR6tyQIV6JzZjq68FUEJMuzBOadsFrbJpeH2PVokR6VfCsa2eh6YFV60GQL54bVgkmW2av 9Ve6f9krwuUo5rMAX30JZ8YrQ/qS+f5gX2AHsbHoKQNBLX8C+U41PjLMXbsAFMjukatk52 la0D68B/iWt/JvFhZiOINCU9nhCjcLGpY7bx6Zz6z73kxTUWblveByZzQHGjFQzEMhcq6R bg8TfmLZ00B56EXr79fG4vLR2hTiFfiv3Q1hL3UtdZlQwYYtYlEnnCN6NSb1fWn9YLZvZo XgldEn4uudcVOLXglHqDnzhXdt+quv6qIDAN18//lqO4KwyozlY/xbYe3IcwoA== 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 4YCTZn1wB3zfr5; Tue, 17 Dec 2024 20:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BHKsfge036435; Tue, 17 Dec 2024 20:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHKsfan036432; Tue, 17 Dec 2024 20:54:41 GMT (envelope-from git) Date: Tue, 17 Dec 2024 20:54:41 GMT Message-Id: <202412172054.4BHKsfan036432@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: e1060f6dfd80 - main - ofw: Fix inverted bcmp in ofw_bus_node_status_okay List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1060f6dfd80b34cab6d439bf7420ad686ddc8f1 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=e1060f6dfd80b34cab6d439bf7420ad686ddc8f1 commit e1060f6dfd80b34cab6d439bf7420ad686ddc8f1 Author: Jessica Clarke AuthorDate: 2024-12-17 20:51:56 +0000 Commit: Jessica Clarke CommitDate: 2024-12-17 20:51:56 +0000 ofw: Fix inverted bcmp in ofw_bus_node_status_okay Otherwise this matches any two-character status except for ok. Fixes: e5e94d2de987 ("Expand OpenFirmware API with ofw_bus_node_status_okay method") MFC after: 1 week --- sys/dev/ofw/ofw_bus_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index a6d562cd8e9d..4d0479dfb957 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -210,7 +210,7 @@ ofw_bus_node_status_okay(phandle_t node) OF_getprop(node, "status", status, OFW_STATUS_LEN); if ((len == 5 && (bcmp(status, "okay", len) == 0)) || - (len == 3 && (bcmp(status, "ok", len)))) + (len == 3 && (bcmp(status, "ok", len) == 0))) return (1); return (0);