diff options
author | Warner Losh <imp@FreeBSD.org> | 2021-06-28 22:04:02 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2021-06-28 22:13:03 +0000 |
commit | 50aa1daf14688a6f85f324a8efa8708a25b46a86 (patch) | |
tree | a6a64661de2ee42e724d7500904519cb8b11f25a | |
parent | 2b09870238048cb2bd911b2e3dfb281c72ef1fb8 (diff) | |
download | src-50aa1daf14688a6f85f324a8efa8708a25b46a86.tar.gz src-50aa1daf14688a6f85f324a8efa8708a25b46a86.zip |
-rw-r--r-- | sys/cam/cam_xpt.c | 8 | ||||
-rw-r--r-- | sys/cam/cam_xpt.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 016f0e6a38be..b76d6f5adde7 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3669,14 +3669,14 @@ xpt_compile_path(struct cam_path *new_path, struct cam_periph *perph, return (status); } -cam_status +int xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) { struct cam_path *new_path; new_path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (new_path == NULL) - return(CAM_RESRC_UNAVAIL); + return (ENOMEM); *new_path = *path; if (path->bus != NULL) xpt_acquire_bus(path->bus); @@ -3685,7 +3685,7 @@ xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) if (path->device != NULL) xpt_acquire_device(path->device); *new_path_ptr = new_path; - return (CAM_REQ_CMP); + return (0); } void @@ -4397,7 +4397,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg) return; } - if (xpt_clone_path(&ccb->ccb_h.path, path) != CAM_REQ_CMP) { + if (xpt_clone_path(&ccb->ccb_h.path, path) != 0) { xpt_print(path, "Can't allocate path to send %s\n", xpt_async_string(async_code)); xpt_free_ccb(ccb); diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index c8494d04234a..b75025dbd4d3 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -138,7 +138,7 @@ cam_status xpt_compile_path(struct cam_path *new_path, path_id_t path_id, target_id_t target_id, lun_id_t lun_id); -cam_status xpt_clone_path(struct cam_path **new_path, +int xpt_clone_path(struct cam_path **new_path, struct cam_path *path); void xpt_release_path(struct cam_path *path); |