git: 0a6b61a89a68 - stable/14 - ocs_fc: Use xpt_path_sbuf() to copy the path to sbuf.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Dec 2023 12:25:42 UTC
The branch stable/14 has been updated by ram:
URL: https://cgit.FreeBSD.org/src/commit/?id=0a6b61a89a68339e358fe5420994eb9f1b8898d8
commit 0a6b61a89a68339e358fe5420994eb9f1b8898d8
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:19:51 +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++) {