diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2831b9c7..158d59bf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -94,7 +94,7 @@ endif (IBVERBS_LIBRARIES) add_library(vitastor_common STATIC epoll_manager.cpp etcd_state_client.cpp messenger.cpp addr_util.cpp msgr_stop.cpp msgr_op.cpp msgr_send.cpp msgr_receive.cpp ringloop.cpp ../json11/json11.cpp - http_client.cpp osd_ops.cpp pg_states.cpp timerfd_manager.cpp base64.cpp ${MSGR_RDMA} + http_client.cpp osd_ops.cpp pg_states.cpp timerfd_manager.cpp str_util.cpp ${MSGR_RDMA} ) target_compile_options(vitastor_common PUBLIC -fPIC) @@ -194,7 +194,7 @@ configure_file(vitastor.pc.in vitastor.pc @ONLY) # vitastor-disk add_executable(vitastor-disk - disk_tool.cpp disk_simple_offsets.cpp crc32c.c base64.cpp ../json11/json11.cpp rw_blocking.cpp allocator.cpp ringloop.cpp blockstore_disk.cpp + disk_tool.cpp disk_simple_offsets.cpp crc32c.c str_util.cpp ../json11/json11.cpp rw_blocking.cpp allocator.cpp ringloop.cpp blockstore_disk.cpp ) target_link_libraries(vitastor-disk tcmalloc_minimal diff --git a/src/cli.cpp b/src/cli.cpp index 8439867b..6723a6a0 100644 --- a/src/cli.cpp +++ b/src/cli.cpp @@ -12,7 +12,7 @@ #include "epoll_manager.h" #include "cluster_client.h" #include "pg_states.h" -#include "base64.h" +#include "str_util.h" static const char *exe_name = NULL; diff --git a/src/cli_alloc_osd.cpp b/src/cli_alloc_osd.cpp index 23a9582c..67433a89 100644 --- a/src/cli_alloc_osd.cpp +++ b/src/cli_alloc_osd.cpp @@ -4,7 +4,7 @@ #include #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" #include diff --git a/src/cli_common.cpp b/src/cli_common.cpp index 99092f85..94c0960f 100644 --- a/src/cli_common.cpp +++ b/src/cli_common.cpp @@ -1,7 +1,7 @@ // Copyright (c) Vitaliy Filippov, 2019+ // License: VNPL-1.1 (see README.md for details) -#include "base64.h" +#include "str_util.h" #include "cluster_client.h" #include "cli.h" diff --git a/src/cli_create.cpp b/src/cli_create.cpp index 39a1d483..a86d3456 100644 --- a/src/cli_create.cpp +++ b/src/cli_create.cpp @@ -4,7 +4,7 @@ #include #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" // Create an image, snapshot or clone // diff --git a/src/cli_df.cpp b/src/cli_df.cpp index daf21e90..30df0a8d 100644 --- a/src/cli_df.cpp +++ b/src/cli_df.cpp @@ -3,7 +3,7 @@ #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" // List pools with space statistics struct pool_lister_t diff --git a/src/cli_ls.cpp b/src/cli_ls.cpp index 6f26e8e9..5128edfb 100644 --- a/src/cli_ls.cpp +++ b/src/cli_ls.cpp @@ -4,7 +4,7 @@ #include #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" // List existing images // diff --git a/src/cli_modify.cpp b/src/cli_modify.cpp index 86c3ff07..c2e8ab55 100644 --- a/src/cli_modify.cpp +++ b/src/cli_modify.cpp @@ -3,7 +3,7 @@ #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" // Rename, resize image (and purge extra data on shrink) or change its readonly status struct image_changer_t diff --git a/src/cli_rm.cpp b/src/cli_rm.cpp index 974f0cf4..127e319f 100644 --- a/src/cli_rm.cpp +++ b/src/cli_rm.cpp @@ -4,7 +4,7 @@ #include #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" // Remove layer(s): similar to merge, but alters metadata and processes multiple merge targets // diff --git a/src/cli_status.cpp b/src/cli_status.cpp index 5b27ea07..90c703b1 100644 --- a/src/cli_status.cpp +++ b/src/cli_status.cpp @@ -3,7 +3,7 @@ #include "cli.h" #include "cluster_client.h" -#include "base64.h" +#include "str_util.h" #include "pg_states.h" #include "http_client.h" diff --git a/src/disk_simple_offsets.cpp b/src/disk_simple_offsets.cpp index 27aa871b..613d5968 100644 --- a/src/disk_simple_offsets.cpp +++ b/src/disk_simple_offsets.cpp @@ -8,7 +8,7 @@ #include #include "json11/json11.hpp" -#include "base64.h" +#include "str_util.h" #include "blockstore.h" // Calculate offsets for a block device and print OSD command line parameters diff --git a/src/disk_tool.cpp b/src/disk_tool.cpp index 903ede4d..1277612d 100644 --- a/src/disk_tool.cpp +++ b/src/disk_tool.cpp @@ -21,7 +21,7 @@ #include "blockstore_impl.h" #include "blockstore_disk.h" #include "osd_id.h" -#include "base64.h" +#include "str_util.h" #include "crc32c.h" #include "rw_blocking.h" diff --git a/src/etcd_state_client.cpp b/src/etcd_state_client.cpp index f8d3a4e4..ac61eed3 100644 --- a/src/etcd_state_client.cpp +++ b/src/etcd_state_client.cpp @@ -7,7 +7,7 @@ #ifndef __MOCK__ #include "addr_util.h" #include "http_client.h" -#include "base64.h" +#include "str_util.h" #endif etcd_state_client_t::~etcd_state_client_t() diff --git a/src/http_client.cpp b/src/http_client.cpp index 7d98e6ea..ee9ffed3 100644 --- a/src/http_client.cpp +++ b/src/http_client.cpp @@ -14,7 +14,7 @@ #include #include "addr_util.h" -#include "base64.h" +#include "str_util.h" #include "json11/json11.hpp" #include "http_client.h" #include "timerfd_manager.h" diff --git a/src/nfs_conn.cpp b/src/nfs_conn.cpp index eacda4b7..21bea799 100644 --- a/src/nfs_conn.cpp +++ b/src/nfs_conn.cpp @@ -5,7 +5,7 @@ #include -#include "base64.h" +#include "str_util.h" #include "nfs_proxy.h" diff --git a/src/nfs_portmap.cpp b/src/nfs_portmap.cpp index 19675418..bb671f0f 100644 --- a/src/nfs_portmap.cpp +++ b/src/nfs_portmap.cpp @@ -12,7 +12,7 @@ #include "malloc_or_die.h" #include "nfs_portmap.h" #include "sha256.h" -#include "base64.h" +#include "str_util.h" /* * The NULL procedure. All protocols/versions must provide a NULL procedure diff --git a/src/nfs_proxy.cpp b/src/nfs_proxy.cpp index 0da1fa67..26c643e2 100644 --- a/src/nfs_proxy.cpp +++ b/src/nfs_proxy.cpp @@ -19,7 +19,7 @@ #include "nfs/portmap.h" #include "addr_util.h" -#include "base64.h" +#include "str_util.h" #include "nfs_proxy.h" #include "http_client.h" #include "cli.h" diff --git a/src/osd_cluster.cpp b/src/osd_cluster.cpp index 824ebace..2e0e282c 100644 --- a/src/osd_cluster.cpp +++ b/src/osd_cluster.cpp @@ -2,7 +2,7 @@ // License: VNPL-1.1 (see README.md for details) #include "osd.h" -#include "base64.h" +#include "str_util.h" #include "etcd_state_client.h" #include "http_client.h" #include "osd_rmw.h" diff --git a/src/osd_peering.cpp b/src/osd_peering.cpp index 4fb894d9..3639ee48 100644 --- a/src/osd_peering.cpp +++ b/src/osd_peering.cpp @@ -6,7 +6,7 @@ #include -#include "base64.h" +#include "str_util.h" #include "osd.h" // Peering loop diff --git a/src/base64.cpp b/src/str_util.cpp similarity index 99% rename from src/base64.cpp rename to src/str_util.cpp index 6b73f84f..95f9b771 100644 --- a/src/base64.cpp +++ b/src/str_util.cpp @@ -3,7 +3,7 @@ #include #include -#include "base64.h" +#include "str_util.h" std::string base64_encode(const std::string &in) { diff --git a/src/base64.h b/src/str_util.h similarity index 100% rename from src/base64.h rename to src/str_util.h