git: 01f3c2655c4c - stable/13 - bhyve nvme: Switch to POSIX standard functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Nov 2022 17:55:28 UTC
The branch stable/13 has been updated by chuck:
URL: https://cgit.FreeBSD.org/src/commit/?id=01f3c2655c4c3410f1ceb262f71ca2a92f4a028b
commit 01f3c2655c4c3410f1ceb262f71ca2a92f4a028b
Author: Chuck Tuffli <chuck@FreeBSD.org>
AuthorDate: 2022-08-17 00:16:06 +0000
Commit: Chuck Tuffli <chuck@FreeBSD.org>
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:
/*