mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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:
@@ -63,7 +63,7 @@ bench_fini_raidz_maps(void)
|
||||
{
|
||||
/* tear down golden zio */
|
||||
raidz_free(zio_bench.io_abd, max_data_size);
|
||||
bzero(&zio_bench, sizeof (zio_t));
|
||||
memset(&zio_bench, 0, sizeof (zio_t));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
@@ -141,10 +141,9 @@ static void process_options(int argc, char **argv)
|
||||
{
|
||||
size_t value;
|
||||
int opt;
|
||||
|
||||
raidz_test_opts_t *o = &rto_opts;
|
||||
|
||||
bcopy(&rto_opts_defaults, o, sizeof (*o));
|
||||
memcpy(o, &rto_opts_defaults, sizeof (*o));
|
||||
|
||||
while ((opt = getopt(argc, argv, "TDBSvha:er:o:d:s:t:")) != -1) {
|
||||
value = 0;
|
||||
|
||||
@@ -92,19 +92,19 @@ static inline size_t ilog2(size_t a)
|
||||
}
|
||||
|
||||
|
||||
#define LOG(lvl, a...) \
|
||||
#define LOG(lvl, ...) \
|
||||
{ \
|
||||
if (rto_opts.rto_v >= lvl) \
|
||||
(void) fprintf(stdout, a); \
|
||||
(void) fprintf(stdout, __VA_ARGS__); \
|
||||
} \
|
||||
|
||||
#define LOG_OPT(lvl, opt, a...) \
|
||||
#define LOG_OPT(lvl, opt, ...) \
|
||||
{ \
|
||||
if (opt->rto_v >= lvl) \
|
||||
(void) fprintf(stdout, a); \
|
||||
(void) fprintf(stdout, __VA_ARGS__); \
|
||||
} \
|
||||
|
||||
#define ERR(a...) (void) fprintf(stderr, a)
|
||||
#define ERR(...) (void) fprintf(stderr, __VA_ARGS__)
|
||||
|
||||
|
||||
#define DBLSEP "================\n"
|
||||
|
||||
Reference in New Issue
Block a user