From 78738262cad2c2fc329b5b1d0e970341cb96c0be Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Wed, 21 Oct 2026 15:01:04 +0300 Subject: [PATCH] iscsi-scstd: Use adjacent literals for administration help text Represent administration and daemon help output with adjacent string literals instead of backslash-newline splicing. Preserve every output line, space, escape and line break. Checkpatch reports LINE_CONTINUATIONS: Avoid line continuations in quoted strings --- iscsi-scst/usr/iscsi_adm.c | 93 ++++++++++++++++++------------------ iscsi-scst/usr/iscsi_scstd.c | 21 ++++---- 2 files changed, 55 insertions(+), 59 deletions(-) diff --git a/iscsi-scst/usr/iscsi_adm.c b/iscsi-scst/usr/iscsi_adm.c index c4d7ca8c9..9df8d5cae 100644 --- a/iscsi-scst/usr/iscsi_adm.c +++ b/iscsi-scst/usr/iscsi_adm.c @@ -66,53 +66,52 @@ static void usage(int status) fprintf(stderr, "Try `%s --help' for more information.\n", program_name); } else { printf("Usage: %s [OPTION]\n", program_name); - printf("\ -iSCSI-SCST Target Administration Utility.\n\ -\n\ - --op new --tid=[id] --params Name=[name]\n\ - add a new target with [id]. [id] must not be zero.\n\ - --op delete --tid=[id]\n\ - delete specific target with [id]. The target must\n\ - have no active sessions.\n\ - --op show --tid=[id]\n\ - show target parameters of target with [id].\n\ - --op show --tid=[id] --sid=[sid]\n\ - show iSCSI parameters in effect for session [sid]. If\n\ - [sid] is \"0\" (zero), the configured parameters\n\ - will be displayed.\n\ - --op show --tid=[id] --user\n\ - show list of Discovery (--tid omitted / id=0 (zero))\n\ - or target CHAP accounts.\n\ - --op show --tid=[id] --user --params=[user]=[name]\n\ - show CHAP account information. [user] can be\n\ - \"IncomingUser\" or \"OutgoingUser\". If --tid is\n\ - omitted / id=0 (zero), [user] is treated as Discovery\n\ - user.\n\ - --op delete --tid=[id] --sid=[sid] --cid=[cid]\n\ - delete specific connection with [cid] in a session\n\ - with [sid] that the target with [id] has.\n\ - If the session has no connections after\n\ - the operation, the session will be deleted\n\ - automatically.\n\ - --op update --tid=[id] --params=key1=value1,key2=value2,...\n\ - change iSCSI target parameters of specific\n\ - target with [id]. You can use parameters in iscsi-scstd.conf\n\ - as a key.\n\ - --op new --tid=[id] --user --params=[user]=[name],Password=[pass]\n\ - add a new account with [pass] for specific target.\n\ - [user] could be [IncomingUser] or [OutgoingUser].\n\ - If you don't specify a target (omit --tid option),\n\ - you add a new account for discovery sessions.\n\ - --op delete --tid=[id] --user --params=[user]=[name]\n\ - delete specific account having [name] of specific\n\ - target. [user] could be [IncomingUser] or\n\ - [OutgoingUser].\n\ - If you don't specify a target (omit --tid option),\n\ - you delete the account for discovery sessions.\n\ - --version display version and exit\n\ - --help display this help and exit\n\ -\n\ -Report bugs to .\n"); + printf("iSCSI-SCST Target Administration Utility.\n" + "\n" + " --op new --tid=[id] --params Name=[name]\n" + " add a new target with [id]. [id] must not be zero.\n" + " --op delete --tid=[id]\n" + " delete specific target with [id]. The target must\n" + " have no active sessions.\n" + " --op show --tid=[id]\n" + " show target parameters of target with [id].\n" + " --op show --tid=[id] --sid=[sid]\n" + " show iSCSI parameters in effect for session [sid]. If\n" + " [sid] is \"0\" (zero), the configured parameters\n" + " will be displayed.\n" + " --op show --tid=[id] --user\n" + " show list of Discovery (--tid omitted / id=0 (zero))\n" + " or target CHAP accounts.\n" + " --op show --tid=[id] --user --params=[user]=[name]\n" + " show CHAP account information. [user] can be\n" + " \"IncomingUser\" or \"OutgoingUser\". If --tid is\n" + " omitted / id=0 (zero), [user] is treated as Discovery\n" + " user.\n" + " --op delete --tid=[id] --sid=[sid] --cid=[cid]\n" + " delete specific connection with [cid] in a session\n" + " with [sid] that the target with [id] has.\n" + " If the session has no connections after\n" + " the operation, the session will be deleted\n" + " automatically.\n" + " --op update --tid=[id] --params=key1=value1,key2=value2,...\n" + " change iSCSI target parameters of specific\n" + " target with [id]. You can use parameters in iscsi-scstd.conf\n" + " as a key.\n" + " --op new --tid=[id] --user --params=[user]=[name],Password=[pass]\n" + " add a new account with [pass] for specific target.\n" + " [user] could be [IncomingUser] or [OutgoingUser].\n" + " If you don't specify a target (omit --tid option),\n" + " you add a new account for discovery sessions.\n" + " --op delete --tid=[id] --user --params=[user]=[name]\n" + " delete specific account having [name] of specific\n" + " target. [user] could be [IncomingUser] or\n" + " [OutgoingUser].\n" + " If you don't specify a target (omit --tid option),\n" + " you delete the account for discovery sessions.\n" + " --version display version and exit\n" + " --help display this help and exit\n" + "\n" + "Report bugs to .\n"); } exit(status == 0 ? 0 : -1); } diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index 62f1ccd09..9d35c559e 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -75,18 +75,15 @@ static void usage(int status) fprintf(stderr, "Try `%s --help' for more information.\n", program_name); } else { printf("Usage: %s [OPTION]\n", program_name); - printf("\ -iSCSI target daemon.\n\ - -c, --config=[path] Execute in the config file.\n"); - printf("\ - -f, --foreground make the program run in the foreground\n\ - -d, --debug debuglevel print debugging information\n\ - -u, --uid=uid run as uid, default is current user\n\ - -g, --gid=gid run as gid, default is current user group\n\ - -a, --address=address ... listen on specified space-separated list of local address instead of all\n\ - -p, --port=port listen on specified port instead of 3260\n\ - -h, --help display this help and exit\n\ -"); + printf("iSCSI target daemon.\n" + " -c, --config=[path] Execute in the config file.\n"); + printf(" -f, --foreground make the program run in the foreground\n" + " -d, --debug debuglevel print debugging information\n" + " -u, --uid=uid run as uid, default is current user\n" + " -g, --gid=gid run as gid, default is current user group\n" + " -a, --address=address ... listen on specified space-separated list of local address instead of all\n" + " -p, --port=port listen on specified port instead of 3260\n" + " -h, --help display this help and exit\n"); } exit(1); }