From: Alex Zhuravlev Date: Wed, 26 Jul 2023 13:20:38 +0000 (+0300) Subject: EX-7968 utils: lamigo to accept multi-word args X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=cff3180754e6400902ddab571bd030260777e811;p=fs%2Flustre-release.git EX-7968 utils: lamigo to accept multi-word args so we can put something like the following into the config file: mirror-cmd=lfs mirror extend -N --stats --stats-interval=1 -W1M Test-Parameters: trivial testlist=hot-pools Signed-off-by: Alex Zhuravlev Change-Id: Ib01c4b4c76a46ee44189cc6fa763306b059886b3 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51768 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lipe/src/lamigo.c b/lipe/src/lamigo.c index 4e70d09..3beabfa 100644 --- a/lipe/src/lamigo.c +++ b/lipe/src/lamigo.c @@ -2526,7 +2526,7 @@ static void load_config(char *name) } if (opt->has_arg == required_argument || opt->has_arg == optional_argument) { - optarg = strsep(&s, "\n "); + optarg = strsep(&s, "\n"); if (!optarg && opt->has_arg == required_argument) LX_FATAL("option '%s' requires an argument\n", t); diff --git a/lustre/tests/hot-pools.sh b/lustre/tests/hot-pools.sh index 941a3f0..e9c1300 100755 --- a/lustre/tests/hot-pools.sh +++ b/lustre/tests/hot-pools.sh @@ -358,7 +358,7 @@ create_one_lamigo_cfg() { [[ -z \\\"$LAMIGO_EXTRA\\\" ]] || echo \\\"$LAMIGO_EXTRA\\\" >> $cfg_file; [[ -z \\\"$LAMIGO_MIRROR_CMD\\\" ]] || - echo mirror-cmd=\'$LAMIGO_MIRROR_CMD\' >> $cfg_file; + echo mirror-cmd=$LAMIGO_MIRROR_CMD >> $cfg_file; [[ -z \\\"$LAMIGO_DUMP\\\" ]] || echo dump=\\\"${LAMIGO_DUMP}.$mdt\\\" >> $cfg_file; ! $LAMIGO_DEBUG || echo debug >> $cfg_file;