Page MenuHomeFreeBSD

D30884.diff
No OneTemporary

D30884.diff

diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h
--- a/sys/cam/cam_xpt.h
+++ b/sys/cam/cam_xpt.h
@@ -138,7 +138,7 @@
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);
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -3669,14 +3669,14 @@
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 @@
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 @@
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);

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 25, 11:13 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12754916
Default Alt Text
D30884.diff (1 KB)

Event Timeline