From nobody Wed Aug 17 00:29:07 2022 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 4M6pmM44Yhz4ZsMg; Wed, 17 Aug 2022 00:29:07 +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 4M6pmM3byBz460F; Wed, 17 Aug 2022 00:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660696147; 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=+XkUH6wE88ZNC/Qu1z3othrmnoxO9AjjT8ARt139KEI=; b=hZNZ2YNps3Qzhw4mIdMeovB4uVJ8dfiJQZGoCE0MM/OoE7iC/PUxO1Jjx0vWkELeJzuqSs gVMSWliFBEi736/5z6+0JF9RYHZ5L1P9toJUybjd9JjvRBfBVFJtKY5z7fRrYxuSAneo7J dxZP1iu5xOC42DDqFpC/gUem5R7tUZITfw7yImFnrs2rGJkbfgkND5Hqx/APddLc98nLcX Lz2zq/wPXDeRAeyERFtO1tJhx0hz5rEK0eF1UCkOEjcYasgAurHjHnfMj59OCKc9EO1uVv 4wfQONs2VdBljNgxD6j1sxxkRmTs7AarfW4eczlsX+NI6KEr2rA98jkqnXdGdA== 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 4M6pmM2Y2CzVHb; Wed, 17 Aug 2022 00:29:07 +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 27H0T721040730; Wed, 17 Aug 2022 00:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27H0T7wn040729; Wed, 17 Aug 2022 00:29:07 GMT (envelope-from git) Date: Wed, 17 Aug 2022 00:29:07 GMT Message-Id: <202208170029.27H0T7wn040729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: 6391be308944 - main - bhyve nvme: Switch to POSIX standard functions 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 6391be30894460c03a70e0321e99b2bdcda8eebf Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660696147; 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=+XkUH6wE88ZNC/Qu1z3othrmnoxO9AjjT8ARt139KEI=; b=ZT+iFNg6m59ePiuuA3NIjw0iTYvSPz3P787qFkB7EQCo5EK370UCEa9cMZP7nf2xpwDJZa gp427E8OSSzLzTOP+UnLIRRqnK8T4SOm7EXT4Ozewg4BuhQaseEhw6yyPCbinYVU+1XHQW Lqdd2mviC/g4GY8HCAZe6kEUkmlMcToTwE/ugrIUwN+3t1p3G4TbIwDx+PXWfJ/w11NFRh GfXm4xpGOU91P2iWNdLqyJvGMitcIKyMdHAJQ0g4wuyFydjgiaEY0XVDJN6lvHrUzs+xgs pmUstgV/qFuYG3bw4CKvhWSVFhUeS83djeXZyKKxVZVbEQVSnJ9ERw+9JvrN6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660696147; a=rsa-sha256; cv=none; b=k4mv3Anu6R5JJ6y0SlVQsUalMtrAPpXE3t0qU0ZkbwCo69rHM349D+gKmfVTogyZQ7U02U hr8II6sTmcYeQ5bsIKv7LO9060WNaws7uWfnU+V7irdQNAwKga+ZU/+XHrFBsC4TSGBr4Y Tzo12aHA6w3a29wbLeihsi9Yx72/Wo8YACsk0NxiAveM6nHsaxKnzR0pQfb7H78/LwltGr m4K0O/MAckUoIld6QDZZBL6UBTRNxFvh/VeQ8Atw4ZTL3l2KUe9Kf7CYiLOg/XIU5BsGMe X7pPJ2xfO841PVak5PMXD+lXrFjTPETgdsOYyokGIPIfby6QMEz8hxYOd88m2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=6391be30894460c03a70e0321e99b2bdcda8eebf commit 6391be30894460c03a70e0321e99b2bdcda8eebf Author: Chuck Tuffli AuthorDate: 2022-08-17 00:16:06 +0000 Commit: Chuck Tuffli CommitDate: 2022-08-17 00:23:27 +0000 bhyve nvme: Switch to POSIX standard functions Switch bzero to memset and bcopy to memcpy Reviewed by: imp, jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36215 --- 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 d983125367f2..e180ce0de7ca 100644 --- a/usr.sbin/bhyve/pci_nvme.c +++ b/usr.sbin/bhyve/pci_nvme.c @@ -1550,7 +1550,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 */ @@ -1562,12 +1562,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: /*