Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hpsa: fix path_info_show

Left off some changes from Rasmus Villemoes where he changed snprintf to
scnprintf.

Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Justin Lindley <justin.lindley@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Don Brace and committed by
Martin K. Petersen
2708f295 a8036dfb

+6 -6
+6 -6
drivers/scsi/hpsa.c
··· 795 795 if (hdev->external || 796 796 hdev->devtype == TYPE_RAID || 797 797 is_logical_device(hdev)) { 798 - output_len += snprintf(buf + output_len, 798 + output_len += scnprintf(buf + output_len, 799 799 PAGE_SIZE - output_len, 800 800 "%s\n", active); 801 801 continue; ··· 809 809 if (phys_connector[1] < '0') 810 810 phys_connector[1] = '0'; 811 811 if (hdev->phys_connector[i] > 0) 812 - output_len += snprintf(buf + output_len, 812 + output_len += scnprintf(buf + output_len, 813 813 PAGE_SIZE - output_len, 814 814 "PORT: %.2s ", 815 815 phys_connector); 816 816 if (hdev->devtype == TYPE_DISK && hdev->expose_device) { 817 817 if (box == 0 || box == 0xFF) { 818 - output_len += snprintf(buf + output_len, 818 + output_len += scnprintf(buf + output_len, 819 819 PAGE_SIZE - output_len, 820 820 "BAY: %hhu %s\n", 821 821 bay, active); 822 822 } else { 823 - output_len += snprintf(buf + output_len, 823 + output_len += scnprintf(buf + output_len, 824 824 PAGE_SIZE - output_len, 825 825 "BOX: %hhu BAY: %hhu %s\n", 826 826 box, bay, active); 827 827 } 828 828 } else if (box != 0 && box != 0xFF) { 829 - output_len += snprintf(buf + output_len, 829 + output_len += scnprintf(buf + output_len, 830 830 PAGE_SIZE - output_len, "BOX: %hhu %s\n", 831 831 box, active); 832 832 } else 833 - output_len += snprintf(buf + output_len, 833 + output_len += scnprintf(buf + output_len, 834 834 PAGE_SIZE - output_len, "%s\n", active); 835 835 } 836 836