提交 6cc55c96 编写于 作者: M Maurizio Lombardi 提交者: Martin K. Petersen

scsi: target: iscsi: Fix an error message in iscsi_check_key()

The first half of the error message is printed by pr_err(), the second half
is printed by pr_debug(). The user will therefore see only the first part
of the message and will miss some useful information.

Link: https://lore.kernel.org/r/20230214141556.762047-1-mlombard@redhat.comSigned-off-by: NMaurizio Lombardi <mlombard@redhat.com>
Reviewed-by: NMike Christie <michael.christie@oracle.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 fe15c26e
...@@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key( ...@@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key(
return param; return param;
if (!(param->phase & phase)) { if (!(param->phase & phase)) {
pr_err("Key \"%s\" may not be negotiated during ", char *phase_name;
param->name);
switch (phase) { switch (phase) {
case PHASE_SECURITY: case PHASE_SECURITY:
pr_debug("Security phase.\n"); phase_name = "Security";
break; break;
case PHASE_OPERATIONAL: case PHASE_OPERATIONAL:
pr_debug("Operational phase.\n"); phase_name = "Operational";
break; break;
default: default:
pr_debug("Unknown phase.\n"); phase_name = "Unknown";
} }
pr_err("Key \"%s\" may not be negotiated during %s phase.\n",
param->name, phase_name);
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册