Fetch the repository succeeded.
From 0802e9dfd27e2333615e8068d7fa55a614bef92e Mon Sep 17 00:00:00 2001
From: Kou Wenqi <kouwenqi@kylinos.cn>
Date: Tue, 13 Aug 2024 10:12:36 +0800
Subject: [PATCH] multipath: display the correct configuration when dumping
config
"multipath -t" and "multipath -T" might show the wrong
multipathd configuration items "retrigger_tries" and
"force_sync". Make sure they don't.
Signed-off-by: Kou Wenqi <kouwenqi@kylinos.cn>
Reviewed-by: Martin Wilck <mwilck@suse.com>
---
multipath/main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c
index 90f940f..69acd06 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -838,8 +838,6 @@ main (int argc, char *argv[])
if (atexit(uninit_config))
condlog(1, "failed to register cleanup handler for config: %m");
conf = get_multipath_config();
- conf->retrigger_tries = 0;
- conf->force_sync = 1;
if (atexit(cleanup_vecs))
condlog(1, "failed to register cleanup handler for vecs: %m");
while ((arg = getopt(argc, argv, ":adDcChl::eFfM:v:p:b:BrR:itTquUwW")) != EOF ) {
@@ -984,6 +982,11 @@ main (int argc, char *argv[])
libmp_udev_set_sync_support(1);
+ if (cmd != CMD_DUMP_CONFIG) {
+ conf->retrigger_tries = 0;
+ conf->force_sync = 1;
+ }
+
if ((cmd == CMD_LIST_SHORT || cmd == CMD_LIST_LONG) && enable_foreign)
conf->enable_foreign = strdup("");
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。