From 628e935fe5dbe367cccf647e17ebd584b99c9f9a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 15 Nov 2006 20:49:27 +0000 Subject: [PATCH] Narrowed system specific part of enumerate_common() --- libburn/sg-freebsd-port.c | 17 ++++++++++++----- libburn/sg-linux.c | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/libburn/sg-freebsd-port.c b/libburn/sg-freebsd-port.c index 0562260..7919122 100644 --- a/libburn/sg-freebsd-port.c +++ b/libburn/sg-freebsd-port.c @@ -1,7 +1,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. 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:". 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 */ /* Adapter specific handles and data */ out.cam = NULL; - /* Adapter specific functions */ + + /* PORTING: ---------------- end of non portable part ------------ */ + + /* Adapter specific functions with standardized names */ out.grab = sg_grab; out.release = sg_release; out.drive_is_open = sg_drive_is_open; out.issue_command = sg_issue_command; - - /* PORTING: ---------------- end of non portable part ------------ */ - /* Finally register drive and inquire drive information */ burn_drive_finish_enum(&out); } diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index f4fa327..572ac04 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -1,7 +1,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. 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 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; for(i= 0; i