7 Star 1 Fork 10

src-openEuler / libiscsi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0018-iscsi-swp-handle-setting-of-debug_level-correctly.patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
From b087a09a0b7754765d3d646c20b5a122eb2b3847 Mon Sep 17 00:00:00 2001
From: sallyjunjun <72725839+sallyjunjun@users.noreply.github.com>
Date: Tue, 31 May 2022 17:21:09 +0800
Subject: [PATCH 2/4] iscsi-swp: handle setting of debug_level correctly
According to the man page and help info, --debug=integer can specify the
debug_level, while it would report following error:
iscsi-swp --debug=1
iscsi-swp: option '--debug' doesn't allow an argument
---
utils/iscsi-swp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/utils/iscsi-swp.c b/utils/iscsi-swp.c
index af07c81..8c2ca31 100644
--- a/utils/iscsi-swp.c
+++ b/utils/iscsi-swp.c
@@ -75,14 +75,14 @@ int main(int argc, char *argv[])
static struct option long_options[] = {
{"help", no_argument, NULL, 'h'},
{"usage", no_argument, NULL, 'u'},
- {"debug", no_argument, NULL, 'd'},
+ {"debug", required_argument, NULL, 'd'},
{"initiator-name", required_argument, NULL, 'i'},
{"swp", required_argument, NULL, 's'},
{0, 0, 0, 0}
};
int option_index;
- while ((c = getopt_long(argc, argv, "h?udi:s:", long_options,
+ while ((c = getopt_long(argc, argv, "h?ud:i:s:", long_options,
&option_index)) != -1) {
switch (c) {
case 'h':
@@ -93,7 +93,7 @@ int main(int argc, char *argv[])
show_usage = 1;
break;
case 'd':
- debug = 1;
+ debug = atoi(optarg);
break;
case 'i':
initiator = optarg;
--
1.8.3.1
1
https://gitee.com/src-openeuler/libiscsi.git
git@gitee.com:src-openeuler/libiscsi.git
src-openeuler
libiscsi
libiscsi
master

搜索帮助