diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2020-04-07 15:16:48 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2020-04-07 15:20:44 (GMT) |
commit | d97c00013dd5b13b618d08d9b6d6517176674a4e (patch) | |
tree | c972bbe7858f771f2c17b93f93db8f17b528f1ee /utils/mirror_vfd/mirror_server.c | |
parent | f771958d757e388d9b9cebb21ca03f00505ada5b (diff) | |
download | hdf5-d97c00013dd5b13b618d08d9b6d6517176674a4e.zip hdf5-d97c00013dd5b13b618d08d9b6d6517176674a4e.tar.gz hdf5-d97c00013dd5b13b618d08d9b6d6517176674a4e.tar.bz2 |
Tidying of Mirror VFD.
* Rename server-stop utility to mirror_server_stop.
* Remove external dependency on bzero().
* Modify test/use_common to use only the public API.
* Rename internal bitswap macro to follow convention.
Diffstat (limited to 'utils/mirror_vfd/mirror_server.c')
-rw-r--r-- | utils/mirror_vfd/mirror_server.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/utils/mirror_vfd/mirror_server.c b/utils/mirror_vfd/mirror_server.c index 314f067..2583e60 100644 --- a/utils/mirror_vfd/mirror_server.c +++ b/utils/mirror_vfd/mirror_server.c @@ -137,6 +137,27 @@ struct server_run { /* --------------------------------------------------------------------------- + * Function: mybzero + * + * Purpose: Introduce bzero without neededing it on the system. + * + * Programmer: Jacob Smith + * 2020-03-30 + * --------------------------------------------------------------------------- + */ +static void mybzero(void *dest, size_t size) +{ + size_t i = 0; + char *s = NULL; + HDassert(dest); + s = (char *)dest; + for (i = 0; i < size; i++) { + *(s+i) = 0; + } +} /* end mybzero() */ + + +/* --------------------------------------------------------------------------- * Function: usage * * Purpose: Print the usage message to stdout. @@ -187,8 +208,8 @@ parse_args(int argc, char **argv, struct op_args *args_out) args_out->log_prepend_type = 1; args_out->verbosity = MIRROR_LOG_DEFAULT_VERBOSITY; /* preset empty strings */ - HDbzero(args_out->log_path, PATH_MAX+1); - HDbzero(args_out->writer_log_path, PATH_MAX+1); + mybzero(args_out->log_path, PATH_MAX+1); + mybzero(args_out->writer_log_path, PATH_MAX+1); if (argv == NULL || *argv == NULL) { mirror_log(NULL, V_ERR, "invalid argv pointer"); |