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:
наб
2022-02-25 14:26:54 +01:00
committed by Brian Behlendorf
parent 1d77d62f5a
commit 861166b027
129 changed files with 990 additions and 1051 deletions
+3 -3
View File
@@ -641,7 +641,7 @@ mzap_upgrade(zap_t **zapp, void *tag, dmu_tx_t *tx, zap_flags_t flags)
int sz = zap->zap_dbuf->db_size;
mzap_phys_t *mzp = vmem_alloc(sz, KM_SLEEP);
bcopy(zap->zap_dbuf->db_data, mzp, sz);
memcpy(mzp, zap->zap_dbuf->db_data, sz);
int nchunks = zap->zap_m.zap_num_chunks;
if (!flags) {
@@ -1407,7 +1407,7 @@ zap_remove_impl(zap_t *zap, const char *name,
err = SET_ERROR(ENOENT);
} else {
zap->zap_m.zap_num_entries--;
bzero(&zap_m_phys(zap)->mz_chunk[mze->mze_chunkid],
memset(&zap_m_phys(zap)->mz_chunk[mze->mze_chunkid], 0,
sizeof (mzap_ent_phys_t));
mze_remove(zap, mze);
}
@@ -1632,7 +1632,7 @@ zap_get_stats(objset_t *os, uint64_t zapobj, zap_stats_t *zs)
if (err != 0)
return (err);
bzero(zs, sizeof (zap_stats_t));
memset(zs, 0, sizeof (zap_stats_t));
if (zap->zap_ismicro) {
zs->zs_blocksize = zap->zap_dbuf->db_size;