log: Make log_level and trace related RPCs callable during SPDK startup
Change-Id: I049fea136f1ea37129ec73de98fc021b4b71e3f6 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/408419 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
24db7333d1
commit
5c55a00df3
@ -134,7 +134,8 @@ invalid:
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
|
||||
free_rpc_log_level(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("set_log_print_level", spdk_rpc_set_log_print_level, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("set_log_print_level", spdk_rpc_set_log_print_level,
|
||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_get_log_print_level(struct spdk_jsonrpc_request *request,
|
||||
@ -162,7 +163,8 @@ spdk_rpc_get_log_print_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("get_log_print_level", spdk_rpc_get_log_print_level, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("get_log_print_level", spdk_rpc_get_log_print_level,
|
||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_set_log_level(struct spdk_jsonrpc_request *request,
|
||||
@ -201,7 +203,7 @@ invalid:
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
|
||||
free_rpc_log_level(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("set_log_level", spdk_rpc_set_log_level, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("set_log_level", spdk_rpc_set_log_level, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_get_log_level(struct spdk_jsonrpc_request *request,
|
||||
@ -228,7 +230,7 @@ spdk_rpc_get_log_level(struct spdk_jsonrpc_request *request,
|
||||
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("get_log_level", spdk_rpc_get_log_level, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("get_log_level", spdk_rpc_get_log_level, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_set_trace_flag(struct spdk_jsonrpc_request *request,
|
||||
@ -264,7 +266,7 @@ invalid:
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
|
||||
free_rpc_trace_flag(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("set_trace_flag", spdk_rpc_set_trace_flag, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("set_trace_flag", spdk_rpc_set_trace_flag, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_clear_trace_flag(struct spdk_jsonrpc_request *request,
|
||||
@ -300,7 +302,8 @@ invalid:
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, "Invalid parameters");
|
||||
free_rpc_trace_flag(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("clear_trace_flag", spdk_rpc_clear_trace_flag, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("clear_trace_flag", spdk_rpc_clear_trace_flag,
|
||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
||||
static void
|
||||
spdk_rpc_get_trace_flags(struct spdk_jsonrpc_request *request,
|
||||
@ -330,4 +333,4 @@ spdk_rpc_get_trace_flags(struct spdk_jsonrpc_request *request,
|
||||
spdk_json_write_object_end(w);
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
}
|
||||
SPDK_RPC_REGISTER("get_trace_flags", spdk_rpc_get_trace_flags, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("get_trace_flags", spdk_rpc_get_trace_flags, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||
|
Loading…
x
Reference in New Issue
Block a user