]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hpsa: fix path_info_show
authorDon Brace <don.brace@pmcs.com>
Fri, 6 May 2016 19:12:53 +0000 (12:12 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 22 May 2016 21:50:03 +0000 (14:50 -0700)
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>
Orabug: 23064595
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/scsi/hpsa.c

index a3860367b568aa06adf4290bf84717458c241e77..f8370b8efc712f43de09805a0a1e03990690f917 100644 (file)
@@ -795,7 +795,7 @@ static ssize_t path_info_show(struct device *dev,
                if (hdev->external ||
                        hdev->devtype == TYPE_RAID ||
                        is_logical_device(hdev)) {
-                       output_len += snprintf(buf + output_len,
+                       output_len += scnprintf(buf + output_len,
                                                PAGE_SIZE - output_len,
                                                "%s\n", active);
                        continue;
@@ -809,28 +809,28 @@ static ssize_t path_info_show(struct device *dev,
                if (phys_connector[1] < '0')
                        phys_connector[1] = '0';
                if (hdev->phys_connector[i] > 0)
-                       output_len += snprintf(buf + output_len,
+                       output_len += scnprintf(buf + output_len,
                                PAGE_SIZE - output_len,
                                "PORT: %.2s ",
                                phys_connector);
                if (hdev->devtype == TYPE_DISK && hdev->expose_device) {
                        if (box == 0 || box == 0xFF) {
-                               output_len += snprintf(buf + output_len,
+                               output_len += scnprintf(buf + output_len,
                                        PAGE_SIZE - output_len,
                                        "BAY: %hhu %s\n",
                                        bay, active);
                        } else {
-                               output_len += snprintf(buf + output_len,
+                               output_len += scnprintf(buf + output_len,
                                        PAGE_SIZE - output_len,
                                        "BOX: %hhu BAY: %hhu %s\n",
                                        box, bay, active);
                        }
                } else if (box != 0 && box != 0xFF) {
-                       output_len += snprintf(buf + output_len,
+                       output_len += scnprintf(buf + output_len,
                                PAGE_SIZE - output_len, "BOX: %hhu %s\n",
                                box, active);
                } else
-                       output_len += snprintf(buf + output_len,
+                       output_len += scnprintf(buf + output_len,
                                PAGE_SIZE - output_len, "%s\n", active);
        }