mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
librados: rados_X_command need to assemble a vector from char *cmd
The old monitors take a vector with words split; new monitors don't care, but the old ones do Signed-off-by: Dan Mick <dan.mick@inktank.com>
This commit is contained in:
parent
783b7ec847
commit
2431bfb605
@ -24,6 +24,7 @@
|
||||
#include "librados/IoCtxImpl.h"
|
||||
#include "librados/PoolAsyncCompletionImpl.h"
|
||||
#include "librados/RadosClient.h"
|
||||
#include "include/str_list.h"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
@ -1761,6 +1762,7 @@ extern "C" int rados_mon_command(rados_t cluster, const char *cmd,
|
||||
string outstring;
|
||||
vector<string> cmdvec;
|
||||
|
||||
get_str_vec(string(cmd), cmdvec);
|
||||
cmdvec.push_back(cmd);
|
||||
inbl.append(inbuf, inbuflen);
|
||||
int ret = client->mon_command(cmdvec, inbl, &outbl, &outstring);
|
||||
@ -1781,7 +1783,7 @@ extern "C" int rados_osd_command(rados_t cluster, int osdid, const char *cmd,
|
||||
string outstring;
|
||||
vector<string> cmdvec;
|
||||
|
||||
cmdvec.push_back(cmd);
|
||||
get_str_vec(string(cmd), cmdvec);
|
||||
inbl.append(inbuf, inbuflen);
|
||||
int ret = client->osd_command(osdid, cmdvec, inbl, &outbl, &outstring);
|
||||
|
||||
@ -1805,7 +1807,7 @@ extern "C" int rados_pg_command(rados_t cluster, const char *pgstr,
|
||||
pg_t pgid;
|
||||
vector<string> cmdvec;
|
||||
|
||||
cmdvec.push_back(cmd);
|
||||
get_str_vec(string(cmd), cmdvec);
|
||||
inbl.append(inbuf, inbuflen);
|
||||
if (!pgid.parse(pgstr))
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user