git: e8ff00285afb - stable/13 - ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf.

From: Ram Kishore Vegesna <ram_at_FreeBSD.org>
Date: Wed, 27 Dec 2023 12:32:45 UTC
The branch stable/13 has been updated by ram:

URL: https://cgit.FreeBSD.org/src/commit/?id=e8ff00285afb3b9ab573f6c080a1095ab0f95c1e

commit e8ff00285afb3b9ab573f6c080a1095ab0f95c1e
Author:     Ram Kishore Vegesna <ram@FreeBSD.org>
AuthorDate: 2023-12-13 07:56:40 +0000
Commit:     Ram Kishore Vegesna <ram@FreeBSD.org>
CommitDate: 2023-12-27 12:28:25 +0000

    ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf.
    
     Reported by:   imp
     MFC after:     1 week
    
    (cherry picked from commit a9504d76ccdad240b7d5761f4208e252f57042dd)
---
 sys/dev/ocs_fc/ocs_cam.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/ocs_fc/ocs_cam.c b/sys/dev/ocs_fc/ocs_cam.c
index 0fa94083e898..a944c7628d85 100644
--- a/sys/dev/ocs_fc/ocs_cam.c
+++ b/sys/dev/ocs_fc/ocs_cam.c
@@ -1540,15 +1540,13 @@ static int32_t ocs_scsi_initiator_io_cb(ocs_io_t *io,
 		}
 	} else if (scsi_status != OCS_SCSI_STATUS_GOOD) {
 		const char *err_desc = NULL;
-		char path_str[64];
 		char err_str[224];
 		struct sbuf sb;
 		size_t i;
 
 		sbuf_new(&sb, err_str, sizeof(err_str), 0);
 
-		xpt_path_string(ccb->ccb_h.path, path_str, sizeof(path_str));
-		sbuf_cat(&sb, path_str);
+		xpt_path_sbuf(ccb->ccb_h.path, &sb);
 
 		for (i = 0; i < (sizeof(ocs_status_desc) /
 		     sizeof(ocs_status_desc[0])); i++) {