| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /******************************************************************************* |
|---|
| 2 | 3 | * Modern ConfigFS group context specific iSCSI statistics based on original |
|---|
| 3 | 4 | * iscsi_target_mib.c code |
|---|
| .. | .. |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Author: Nicholas A. Bellinger <nab@linux-iscsi.org> |
|---|
| 8 | 9 | * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | 10 | ******************************************************************************/ |
|---|
| 19 | 11 | |
|---|
| 20 | 12 | #include <linux/configfs.h> |
|---|
| .. | .. |
|---|
| 328 | 320 | { |
|---|
| 329 | 321 | struct iscsi_tiqn *tiqn = iscsi_tgt_attr_tiqn(item); |
|---|
| 330 | 322 | struct iscsi_login_stats *lstat = &tiqn->login_stats; |
|---|
| 331 | | - unsigned char buf[224]; |
|---|
| 323 | + unsigned char buf[ISCSI_IQN_LEN]; |
|---|
| 332 | 324 | |
|---|
| 333 | 325 | spin_lock(&lstat->lock); |
|---|
| 334 | | - snprintf(buf, 224, "%s", lstat->last_intr_fail_name[0] ? |
|---|
| 326 | + snprintf(buf, ISCSI_IQN_LEN, "%s", lstat->last_intr_fail_name[0] ? |
|---|
| 335 | 327 | lstat->last_intr_fail_name : NONE); |
|---|
| 336 | 328 | spin_unlock(&lstat->lock); |
|---|
| 337 | 329 | |
|---|