.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /******************************************************************************* |
---|
2 | 3 | * This file contains main functions related to iSCSI Parameter negotiation. |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Nicholas A. Bellinger <nab@linux-iscsi.org> |
---|
7 | 8 | * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - * (at your option) any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | 9 | ******************************************************************************/ |
---|
18 | 10 | |
---|
19 | 11 | #include <linux/slab.h> |
---|
.. | .. |
---|
1270 | 1262 | return param; |
---|
1271 | 1263 | |
---|
1272 | 1264 | if (!(param->phase & phase)) { |
---|
1273 | | - pr_err("Key \"%s\" may not be negotiated during ", |
---|
1274 | | - param->name); |
---|
| 1265 | + char *phase_name; |
---|
| 1266 | + |
---|
1275 | 1267 | switch (phase) { |
---|
1276 | 1268 | case PHASE_SECURITY: |
---|
1277 | | - pr_debug("Security phase.\n"); |
---|
| 1269 | + phase_name = "Security"; |
---|
1278 | 1270 | break; |
---|
1279 | 1271 | case PHASE_OPERATIONAL: |
---|
1280 | | - pr_debug("Operational phase.\n"); |
---|
| 1272 | + phase_name = "Operational"; |
---|
1281 | 1273 | break; |
---|
1282 | 1274 | default: |
---|
1283 | | - pr_debug("Unknown phase.\n"); |
---|
| 1275 | + phase_name = "Unknown"; |
---|
1284 | 1276 | } |
---|
| 1277 | + pr_err("Key \"%s\" may not be negotiated during %s phase.\n", |
---|
| 1278 | + param->name, phase_name); |
---|
1285 | 1279 | return NULL; |
---|
1286 | 1280 | } |
---|
1287 | 1281 | |
---|