From 61883619fe86cdf8724c908e231f3d6433a51245 Mon Sep 17 00:00:00 2001 From: Alberto Miranda Date: Thu, 17 Nov 2022 11:19:53 +0100 Subject: [PATCH] ADM_update_adhoc_storage: swap argument order --- examples/c/ADM_update_adhoc_storage.c | 2 +- examples/cxx/ADM_update_adhoc_storage.cpp | 4 ++-- src/lib/admire.cpp | 5 ++--- src/lib/admire.h | 4 ++-- src/lib/admire.hpp | 5 ++--- src/lib/c_wrapper.cpp | 4 ++-- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/examples/c/ADM_update_adhoc_storage.c b/examples/c/ADM_update_adhoc_storage.c index 2c58d640..383afbc1 100644 --- a/examples/c/ADM_update_adhoc_storage.c +++ b/examples/c/ADM_update_adhoc_storage.c @@ -118,7 +118,7 @@ main(int argc, char* argv[]) { } // We can now request the update to the server - if((ret = ADM_update_adhoc_storage(server, new_adhoc_ctx, adhoc_storage)) != + if((ret = ADM_update_adhoc_storage(server, adhoc_storage, new_adhoc_ctx)) != ADM_SUCCESS) { fprintf(stderr, "ADM_update_adhoc_storage() failed: %s\n", ADM_strerror(ret)); diff --git a/examples/cxx/ADM_update_adhoc_storage.cpp b/examples/cxx/ADM_update_adhoc_storage.cpp index a353d457..a2905446 100644 --- a/examples/cxx/ADM_update_adhoc_storage.cpp +++ b/examples/cxx/ADM_update_adhoc_storage.cpp @@ -63,8 +63,8 @@ main(int argc, char* argv[]) { server, name, admire::storage::type::gekkofs, adhoc_storage_ctx); - const auto ret = admire::update_adhoc_storage( - server, new_adhoc_storage_ctx, adhoc_storage); + const auto ret = admire::update_adhoc_storage(server, adhoc_storage, + new_adhoc_storage_ctx); if(!ret) { fmt::print(stderr, "FATAL: ADM_update_adhoc_storage() failed: {}\n", diff --git a/src/lib/admire.cpp b/src/lib/admire.cpp index 42c22630..5bb0dae0 100644 --- a/src/lib/admire.cpp +++ b/src/lib/admire.cpp @@ -249,9 +249,8 @@ register_adhoc_storage(const server& srv, const std::string& name, } admire::error_code -update_adhoc_storage(const server& srv, - const adhoc_storage::ctx& adhoc_storage_ctx, - const adhoc_storage& adhoc_storage) { +update_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage, + const adhoc_storage::ctx& adhoc_storage_ctx) { return detail::update_adhoc_storage(srv, adhoc_storage_ctx, adhoc_storage); } diff --git a/src/lib/admire.h b/src/lib/admire.h index d0bf7cbb..2545d6c4 100644 --- a/src/lib/admire.h +++ b/src/lib/admire.h @@ -127,8 +127,8 @@ ADM_register_adhoc_storage(ADM_server_t server, const char* name, * successfully. */ ADM_return_t -ADM_update_adhoc_storage(ADM_server_t server, ADM_adhoc_context_t ctx, - ADM_storage_t adhoc_storage); +ADM_update_adhoc_storage(ADM_server_t server, ADM_storage_t adhoc_storage, + ADM_adhoc_context_t ctx); /** * Remove an already-registered adhoc storage system. diff --git a/src/lib/admire.hpp b/src/lib/admire.hpp index 7cd9045b..13ed1b3b 100644 --- a/src/lib/admire.hpp +++ b/src/lib/admire.hpp @@ -63,9 +63,8 @@ register_adhoc_storage(const server& srv, const std::string& name, const adhoc_storage::ctx& ctx); admire::error_code -update_adhoc_storage(const server& srv, - const adhoc_storage::ctx& adhoc_storage_ctx, - const adhoc_storage& adhoc_storage); +update_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage, + const adhoc_storage::ctx& adhoc_storage_ctx); admire::error_code remove_adhoc_storage(const server& srv, const adhoc_storage& adhoc_storage); diff --git a/src/lib/c_wrapper.cpp b/src/lib/c_wrapper.cpp index d4dd6aa1..e9a2e142 100644 --- a/src/lib/c_wrapper.cpp +++ b/src/lib/c_wrapper.cpp @@ -101,8 +101,8 @@ ADM_register_adhoc_storage(ADM_server_t server, const char* name, } ADM_return_t -ADM_update_adhoc_storage(ADM_server_t server, ADM_adhoc_context_t ctx, - ADM_storage_t adhoc_storage) { +ADM_update_adhoc_storage(ADM_server_t server, ADM_storage_t adhoc_storage, + ADM_adhoc_context_t ctx) { const admire::server srv{server}; -- GitLab