!14 新增patch修复socip模块,异常退出没有赋值异常返回值问题
From: @veega2022 Reviewed-by: @kongzizaixian Signed-off-by: @kongzizaixian, @chenjunxin1992
This commit is contained in:
commit
8898156c59
@ -0,0 +1,35 @@
|
||||
From b70d76d5c20b3fb32e01986568c695da5879106b Mon Sep 17 00:00:00 2001
|
||||
From: veega2022 <zhuweijia@huawei.com>
|
||||
Date: Sat, 10 Dec 2022 18:07:54 +0800
|
||||
Subject: [PATCH] socip: Return -EINVAL when the parameter check fails
|
||||
|
||||
Return -EINVAL when the parameter check fails
|
||||
|
||||
Signed-off-by: fangjian <f.fangjian@huawei.com>
|
||||
---
|
||||
socip/hikp_socip_dumpreg.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/socip/hikp_socip_dumpreg.c b/socip/hikp_socip_dumpreg.c
|
||||
index 088f5dd..b74dac8 100644
|
||||
--- a/socip/hikp_socip_dumpreg.c
|
||||
+++ b/socip/hikp_socip_dumpreg.c
|
||||
@@ -131,6 +131,7 @@ static void hikp_socip_dumpreg_execute(struct major_cmd_ctrl *self)
|
||||
struct hikp_cmd_ret *cmd_ret;
|
||||
|
||||
if (!check_socip_dumpreg_param()) {
|
||||
+ self->err_no = -EINVAL;
|
||||
cmd_socip_dump_help(self, NULL);
|
||||
return;
|
||||
}
|
||||
@@ -141,6 +142,7 @@ static void hikp_socip_dumpreg_execute(struct major_cmd_ctrl *self)
|
||||
hikp_cmd_init(&req_header, SOCIP_MOD, HIKP_SOCIP_CMD_DUMPREG, param[MODULE_ID_INDEX].val);
|
||||
cmd_ret = hikp_cmd_alloc(&req_header, &req_data, sizeof(req_data));
|
||||
if (!cmd_ret) {
|
||||
+ self->err_no=-EINVAL;
|
||||
HIKP_ERROR_PRINT("hikp_cmd_alloc\n");
|
||||
return;
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
Name: hikptool
|
||||
Summary: A userspace tool for Linux providing problem location on Kunpeng chips
|
||||
Version: 1.0.0
|
||||
Release: 5
|
||||
Release: 6
|
||||
License: MulanPSL2
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
ExclusiveOS: linux
|
||||
@ -16,6 +16,8 @@ BuildRequires: gcc make cmake
|
||||
Requires: glibc
|
||||
ExclusiveArch: aarch64
|
||||
|
||||
Patch0001: 0001-socip-Return-EINVAL-when-the-parameter-check-fails.patch
|
||||
|
||||
%description
|
||||
This package contains the hikptool
|
||||
|
||||
@ -67,6 +69,9 @@ fi
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Mon Dec 12 2022 veega2022 <zhuweijia@huawei.com> 1.0.0-6
|
||||
- Add socip patch for fix return -EINVAL when the parameter check fails
|
||||
|
||||
* Thu Nov 24 2022 veega2022 <zhuweijia@huawei.com> 1.0.0-5
|
||||
- Add nic_ppp dump mac and vlan function and change the hikptool permission to 0500
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user