From nobody Sat Nov 19 17:55:28 2022 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 4NF1XJ66PFz4hTy0; Sat, 19 Nov 2022 17:55:28 +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 4NF1XJ5N0Cz46Pr; Sat, 19 Nov 2022 17:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880528; 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=XYkZgY3oB7e266G70moQi7xbT9OJp9slj6q5CpEwZ+M=; b=xUvUXGQ3ZM055KTLh9l6NE/oYcfYGQICIf9udPTu/4z1vhmExxc8IKn8DKZ5+Sr0SY3gzP oCd7Fg1/W8SJUxlt6Bb2aPbGCL8cuCyfKa64e+UqWnX7blA1xWJSWrwCcQCrlzXhRC3Gci +b5P3jQNPnjmlAGkgFYP7iwlt2ho9XIe+hXrwNWyqTORm1hXbNpsTNyMmTiCJ6Xa8ZKLzJ sr1LdslZBjGGaaxk6Zdx4AaGF8CjlV6TY2sQlX3d6EyPmCI5hrKJqy8isCgxR78CfQN2jy YsGbnyzyu9oYKIZshULP5KjNqev5CVkUliuq81htXP5y7exYSakruq8LtJf2cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668880528; 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=XYkZgY3oB7e266G70moQi7xbT9OJp9slj6q5CpEwZ+M=; b=ZAGPU5OXOUbTHYOiBYMcYwv/JbCsOk6mQVHHg2M4OyBDjVHm209R3YLVYsJn7KMRYDQOmO 1pyJZ/5gvxZeGZVKFpOTbLGPnxfZigltmpzOMTweacR6wADn+Ls+5UisqetD0T/YBGhDkD 6XrUYU2I3DPj243skzn6yugIrq1ileKsnOCbg/ueRN28c3Iaf8YSVCXaCgxQEzPrbwxuB9 kXJth9kub7IM1GDLVxb9PcAGJHFBA68HX9Sf49V7foM8BvnquxXbvdJTt/+iSXNd6+R81q r5ZKaO/X8nSRwm5yZTP4+a4JgE/cNRHQc1qaKFAa21DAkZFHLM26jcSDYNfBNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668880528; a=rsa-sha256; cv=none; b=FvDPcC/kSvAuEmMpV5Yx4kWSwCrd/+8M6FE15caRhzTt1s87Q9Svpyvqy62QzUIm6ORaxa ylUimotIcW+Yw3V8Lvxv6TsfGdcc64ah7qqo5Sugzd8gOGy5sdnmbuN/He7F1lN3qY/FXL Man6032wpQ7THYqKHl5gQia7oMgDxaR8t585gcPWqLeGJmyLOUfruKM+nTm6VCUg/PEDqb IR78LcKXghuAH89RMtOlOYzY97IDOM9TqsXVgbvnaSpS+QZI2lpoPzx5EnOMx3kvkpvZc9 lc6oU2G36gvLPlgKOhCGCUu8orekBALJm2X0OQqFVc1x0JLT9NzflMfOcK4ywA== 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 4NF1XJ4NX4zv62; Sat, 19 Nov 2022 17:55:28 +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 2AJHtScY039128; Sat, 19 Nov 2022 17:55:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AJHtSJZ039127; Sat, 19 Nov 2022 17:55:28 GMT (envelope-from git) Date: Sat, 19 Nov 2022 17:55:28 GMT Message-Id: <202211191755.2AJHtSJZ039127@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Chuck Tuffli Subject: git: 01f3c2655c4c - stable/13 - bhyve nvme: Switch to POSIX standard functions 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: chuck X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01f3c2655c4c3410f1ceb262f71ca2a92f4a028b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=01f3c2655c4c3410f1ceb262f71ca2a92f4a028b commit 01f3c2655c4c3410f1ceb262f71ca2a92f4a028b Author: Chuck Tuffli AuthorDate: 2022-08-17 00:16:06 +0000 Commit: Chuck Tuffli CommitDate: 2022-11-20 01:55:27 +0000 bhyve nvme: Switch to POSIX standard functions Switch bzero to memset and bcopy to memcpy (cherry picked from commit 6391be30894460c03a70e0321e99b2bdcda8eebf) --- usr.sbin/bhyve/pci_nvme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c index 141ec2248aeb..d133d4817665 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1522,7 +1522,7 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nvme_command* command, dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, sizeof(uint32_t) * 1024); /* All unused entries shall be zero */ - bzero(dest, sizeof(uint32_t) * 1024); + memset(dest, 0, sizeof(uint32_t) * 1024); ((uint32_t *)dest)[0] = 1; break; case 0x03: /* list of NSID structures in CDW1.NSID, 4096 bytes */ @@ -1534,12 +1534,12 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nvme_command* command, dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, sizeof(uint32_t) * 1024); /* All bytes after the descriptor shall be zero */ - bzero(dest, sizeof(uint32_t) * 1024); + memset(dest, 0, sizeof(uint32_t) * 1024); /* Return NIDT=1 (i.e. EUI64) descriptor */ ((uint8_t *)dest)[0] = 1; ((uint8_t *)dest)[1] = sizeof(uint64_t); - bcopy(sc->nsdata.eui64, ((uint8_t *)dest) + 4, sizeof(uint64_t)); + memcpy(((uint8_t *)dest) + 4, sc->nsdata.eui64, sizeof(uint64_t)); break; case 0x13: /*