代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b9914a2ff92b34242eefd9d42bc80a8b0a6307c5 Mon Sep 17 00:00:00 2001
From: wuchangsheng <wuchangsheng2@huawei.com>
Date: Tue, 8 Mar 2022 14:45:59 +0800
Subject: [PATCH 08/34] fix gazellectl -l option error
---
src/ltran/ltran_dfx.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 159fbb9..381d30d 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -1182,19 +1182,23 @@ static int32_t parse_dfx_cmd_args(int32_t argc, char *argv[], struct gazelle_sta
return num_cmd;
}
-static int32_t check_cmd_support(enum GAZELLE_STAT_MODE stat_mode)
+static int32_t check_cmd_support(struct gazelle_stat_msg_request *req_msg, int32_t req_msg_num)
{
- switch (stat_mode) {
+ switch (req_msg[0].stat_mode) {
case GAZELLE_STAT_LSTACK_LOG_LEVEL_SET:
case GAZELLE_STAT_LSTACK_SHOW:
case GAZELLE_STAT_LSTACK_SHOW_SNMP:
case GAZELLE_STAT_LSTACK_SHOW_CONN:
case GAZELLE_STAT_LSTACK_SHOW_LATENCY:
case GAZELLE_STAT_LSTACK_LOW_POWER_MDF:
- case GAZELLE_STAT_LTRAN_START_LATENCY:
return 0;
default:
- show_usage();
+ if (req_msg[0].stat_mode == GAZELLE_STAT_LTRAN_START_LATENCY &&
+ req_msg[req_msg_num - 1].stat_mode == GAZELLE_STAT_LSTACK_SHOW_LATENCY) {
+ return 0;
+ }
+ /* keep output consistency */
+ printf("connect ltran failed. errno: 111 ret=-1\n");
return -1;
}
@@ -1220,9 +1224,9 @@ int32_t main(int32_t argc, char *argv[])
g_gazelle_dfx_tbl[GAZELLE_STAT_LSTACK_SHOW].recv_size = sizeof(struct gazelle_stack_dfx_data);
g_gazelle_dfx_tbl[GAZELLE_STAT_LTRAN_START_LATENCY].recv_size =sizeof(struct gazelle_stack_dfx_data);
g_gazelle_dfx_tbl[GAZELLE_STAT_LTRAN_STOP_LATENCY].recv_size =sizeof(struct gazelle_stack_dfx_data);
- ret = check_cmd_support(req_msg[msg_index].stat_mode);
+ ret = check_cmd_support(req_msg, req_msg_num);
if (ret < 0) {
- return 0;
+ return -1;
}
}
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。