diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 117 |
1 files changed, 47 insertions, 70 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index b85cec1c93c..da560f2c786 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -2458,9 +2458,8 @@ gf_cli3_1_get_volume (call_frame_t *frame, xlator_t *this, goto out; } - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); ret = cli_cmd_submit (&req, frame, cli_rpc_prog, GLUSTER_CLI_GET_VOLUME, NULL, @@ -2495,9 +2494,8 @@ gf_cli3_1_create_volume (call_frame_t *frame, xlator_t *this, dict = dict_ref ((dict_t *)data); - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get serialized length of dict"); @@ -2558,9 +2556,8 @@ gf_cli3_1_delete_volume (call_frame_t *frame, xlator_t *this, frame->local = local; } - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to get serialize dict"); @@ -2599,9 +2596,8 @@ gf_cli3_1_start_volume (call_frame_t *frame, xlator_t *this, dict = data; local = cli_local_get (); - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize dict"); @@ -2647,9 +2643,8 @@ gf_cli3_1_stop_volume (call_frame_t *frame, xlator_t *this, frame->local = local; } - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *) &req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -2749,9 +2744,8 @@ done: frame->local = local; } - ret = dict_allocate_and_serialize (req_dict, - &req.dict.dict_val, - (size_t *) &req.dict.dict_len); + ret = dict_allocate_and_serialize (req_dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -2785,9 +2779,8 @@ gf_cli3_1_rename_volume (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *) &req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -2822,9 +2815,8 @@ gf_cli3_1_reset_volume (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to get serialized length of dict"); @@ -2857,9 +2849,8 @@ gf_cli3_1_set_volume (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get serialized length of dict"); @@ -2904,9 +2895,8 @@ gf_cli3_1_add_brick (call_frame_t *frame, xlator_t *this, goto out; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get serialized length of dict"); @@ -2972,9 +2962,8 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this, if ((command != GF_OP_CMD_STATUS) && (command != GF_OP_CMD_STOP)) { - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get serialized length of dict"); @@ -3012,9 +3001,8 @@ gf_cli3_1_remove_brick (call_frame_t *frame, xlator_t *this, goto out; } - ret = dict_allocate_and_serialize (req_dict, - &status_req.dict.dict_val, - (size_t *) &status_req.dict.dict_len); + ret = dict_allocate_and_serialize (req_dict, &status_req.dict.dict_val, + &status_req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -3109,9 +3097,8 @@ gf_cli3_1_replace_brick (call_frame_t *frame, xlator_t *this, dst_brick, op); - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_DEBUG, "failed to get serialized length of dict"); @@ -3149,9 +3136,8 @@ gf_cli3_1_log_rotate (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (THIS->name, GF_LOG_ERROR, "failed to serialize dict"); @@ -3186,9 +3172,8 @@ gf_cli3_1_sync_volume (call_frame_t *frame, xlator_t *this, } dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (THIS->name, GF_LOG_ERROR, "failed to serialize dict"); @@ -3253,9 +3238,8 @@ gf_cli3_1_quota (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to get serialized length of dict"); @@ -3629,9 +3613,8 @@ gf_cli3_1_gsync_set (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *) &req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -4001,9 +3984,8 @@ gf_cli3_1_profile_volume (call_frame_t *frame, xlator_t *this, void *data) goto out; dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, @@ -4261,9 +4243,8 @@ gf_cli3_1_top_volume (call_frame_t *frame, xlator_t *this, void *data) goto out; dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -5557,9 +5538,8 @@ gf_cli3_1_status_volume (call_frame_t *frame, xlator_t *this, dict = data; - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log ("cli", GF_LOG_ERROR, "failed to serialize the data"); @@ -5713,7 +5693,7 @@ gf_cli3_1_mount (call_frame_t *frame, xlator_t *this, void *data) req.label = label; ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + &req.dict.dict_len); if (ret) { ret = -1; goto out; @@ -6001,9 +5981,8 @@ gf_cli3_1_heal_volume (call_frame_t *frame, xlator_t *this, frame->local = local; } - ret = dict_allocate_and_serialize (dict, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (dict, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -6082,9 +6061,8 @@ gf_cli3_1_statedump_volume (call_frame_t *frame, xlator_t *this, options = data; - ret = dict_allocate_and_serialize (options, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (options, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log (this->name, GF_LOG_ERROR, "failed to serialize the data"); @@ -6284,9 +6262,8 @@ gf_cli3_1_clearlocks_volume (call_frame_t *frame, xlator_t *this, options = data; - ret = dict_allocate_and_serialize (options, - &req.dict.dict_val, - (size_t *)&req.dict.dict_len); + ret = dict_allocate_and_serialize (options, &req.dict.dict_val, + &req.dict.dict_len); if (ret < 0) { gf_log ("cli", GF_LOG_ERROR, "failed to serialize the data"); |