Narrowed system specific part of enumerate_common()

This commit is contained in:
Thomas Schmitt 2006-11-15 20:49:27 +00:00
parent cf6b3a755c
commit 495e2fa63f
2 changed files with 24 additions and 9 deletions

View File

@ -1,7 +1,8 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* /*
This is the operating system dependent part of libburn. It implements the
This is the operating system dependent SCSI part of libburn. It implements the
transport level aspects of SCSI control and command i/o. transport level aspects of SCSI control and command i/o.
Present implementation: FreeBSD CAM (untested) Present implementation: FreeBSD CAM (untested)
@ -34,6 +35,12 @@ sg_obtain_scsi_adr() tries to obtain SCSI address parameters.
Porting hints are marked by the text "PORTING:". Porting hints are marked by the text "PORTING:".
Send feedback to libburn-hackers@pykix.org . Send feedback to libburn-hackers@pykix.org .
Other source modules where to expect OS dependencies (look for "__FreeBSD__"):
cleanup.c signal_list : add or delete as described in your man 7 signal
transport.h struct burn_drive : OS dependent i/o attributes
BUFFER_SIZE maximum size for a (SCSI) i/o transaction
*/ */
@ -187,14 +194,14 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
/* Operating system adapter is CAM */ /* Operating system adapter is CAM */
/* Adapter specific handles and data */ /* Adapter specific handles and data */
out.cam = NULL; out.cam = NULL;
/* Adapter specific functions */
/* PORTING: ---------------- end of non portable part ------------ */
/* Adapter specific functions with standardized names */
out.grab = sg_grab; out.grab = sg_grab;
out.release = sg_release; out.release = sg_release;
out.drive_is_open = sg_drive_is_open; out.drive_is_open = sg_drive_is_open;
out.issue_command = sg_issue_command; out.issue_command = sg_issue_command;
/* PORTING: ---------------- end of non portable part ------------ */
/* Finally register drive and inquire drive information */ /* Finally register drive and inquire drive information */
burn_drive_finish_enum(&out); burn_drive_finish_enum(&out);
} }

View File

@ -1,7 +1,8 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* /*
This is the operating system dependent part of libburn. It implements the
This is the operating system dependent SCSI part of libburn. It implements the
transport level aspects of SCSI control and command i/o. transport level aspects of SCSI control and command i/o.
Present implementation: Linux SCSI Generic (sg) Present implementation: Linux SCSI Generic (sg)
@ -36,6 +37,12 @@ Send feedback to libburn-hackers@pykix.org .
Hint: You should also look into sg-freebsd-port.c, which is a younger and Hint: You should also look into sg-freebsd-port.c, which is a younger and
in some aspects more straightforward implementation of this interface. in some aspects more straightforward implementation of this interface.
Other source modules where to expect OS dependencies (look for "__FreeBSD__"):
cleanup.c signal_list : add or delete as described in your man 7 signal
transport.h struct burn_drive : OS dependent i/o attributes
BUFFER_SIZE maximum size for a (SCSI) i/o transaction
*/ */
@ -450,14 +457,15 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
out.sibling_count = 0; out.sibling_count = 0;
for(i= 0; i<LIBBURN_SG_MAX_SIBLINGS; i++) for(i= 0; i<LIBBURN_SG_MAX_SIBLINGS; i++)
out.sibling_fds[i] = -1337; out.sibling_fds[i] = -1337;
/* Adapter specific functions */
/* PORTING: ---------------- end of non portable part ------------ */
/* Adapter specific functions with standardized names */
out.grab = sg_grab; out.grab = sg_grab;
out.release = sg_release; out.release = sg_release;
out.drive_is_open= sg_drive_is_open; out.drive_is_open= sg_drive_is_open;
out.issue_command = sg_issue_command; out.issue_command = sg_issue_command;
/* PORTING: ---------------- end of non portable part ------------ */
/* Finally register drive and inquire drive information */ /* Finally register drive and inquire drive information */
burn_drive_finish_enum(&out); burn_drive_finish_enum(&out);
} }