mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Remove bcopy(), bzero(), bcmp()
bcopy() has a confusing argument order and is actually a move, not a copy; they're all deprecated since POSIX.1-2001 and removed in -2008, and we shim them out to mem*() on Linux anyway Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12996
This commit is contained in:
+3
-3
@@ -475,7 +475,7 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd)
|
||||
|
||||
newchild = kmem_alloc(newsize, KM_SLEEP);
|
||||
if (pvd->vdev_child != NULL) {
|
||||
bcopy(pvd->vdev_child, newchild, oldsize);
|
||||
memcpy(newchild, pvd->vdev_child, oldsize);
|
||||
kmem_free(pvd->vdev_child, oldsize);
|
||||
}
|
||||
|
||||
@@ -1426,7 +1426,7 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg)
|
||||
mspp = vmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
|
||||
|
||||
if (expanding) {
|
||||
bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
|
||||
memcpy(mspp, vd->vdev_ms, oldc * sizeof (*mspp));
|
||||
vmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
|
||||
}
|
||||
|
||||
@@ -4418,7 +4418,7 @@ vdev_get_stats_ex(vdev_t *vd, vdev_stat_t *vs, vdev_stat_ex_t *vsx)
|
||||
vdev_t *tvd = vd->vdev_top;
|
||||
mutex_enter(&vd->vdev_stat_lock);
|
||||
if (vs) {
|
||||
bcopy(&vd->vdev_stat, vs, sizeof (*vs));
|
||||
memcpy(vs, &vd->vdev_stat, sizeof (*vs));
|
||||
vs->vs_timestamp = gethrtime() - vs->vs_timestamp;
|
||||
vs->vs_state = vd->vdev_state;
|
||||
vs->vs_rsize = vdev_get_min_asize(vd);
|
||||
|
||||
Reference in New Issue
Block a user