From 08169d63bced68158fe08c52941312122cec6ea8 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 26 Dec 2009 08:01:35 +0000 Subject: [PATCH] New API function burn_scsi_transport_id() --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/init.c | 7 +++++++ libburn/sg-dummy.c | 17 +++++++++++++++-- libburn/sg-freebsd-port.c | 2 +- libburn/sg-freebsd.c | 2 +- libburn/sg-libcdio.c | 4 ++-- libburn/sg-linux.c | 2 +- 7 files changed, 28 insertions(+), 8 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 06646d5..9fc0560 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.12.25.223915" +#define Cdrskin_timestamP "2009.12.26.080301" diff --git a/libburn/init.c b/libburn/init.c index d2c0aa7..71f0695 100644 --- a/libburn/init.c +++ b/libburn/init.c @@ -154,6 +154,13 @@ void burn_finish(void) burn_running = 0; } +/* ts A9122 */ +/** API function. See libburn.h */ +char *burn_scsi_transport_id(int flag) +{ + return sg_initialize_msg; +} + /* ts A60813 */ /** API function. See libburn.h */ diff --git a/libburn/sg-dummy.c b/libburn/sg-dummy.c index f33fc50..08378aa 100644 --- a/libburn/sg-dummy.c +++ b/libburn/sg-dummy.c @@ -7,8 +7,8 @@ the transport level aspects of SCSI control and command i/o. Present implementation: default dummy which enables libburn only to work with stdio: pseudo drive addresses. - For real implementations see sg-linux.c or sg-freebsd.c - + For real implementations see sg-linux.c, sg-freebsd.c, + sg-libcdio.c */ @@ -39,6 +39,19 @@ Present implementation: default dummy which enables libburn only to work extern struct libdax_msgs *libdax_messenger; +/** Performs global initialization of the SCSI transport adapter and eventually + needed operating system facilities. Checks for compatibility supporting + software components. + @param msg returns ids and/or error messages of eventual helpers + @param flag unused yet, submit 0 + @return 1 = success, <=0 = failure +*/ +int sg_initialize(char msg[1024], int flag) +{ + strcpy(msg, "internal X/Open adapter sg-dummy"); + return 1; +} + /** Returns the next index number and the next enumerated drive address. The enumeration has to cover all available and accessible drives. It is allowed to return addresses of drives which are not available but under diff --git a/libburn/sg-freebsd-port.c b/libburn/sg-freebsd-port.c index 18d8980..7ade1d8 100644 --- a/libburn/sg-freebsd-port.c +++ b/libburn/sg-freebsd-port.c @@ -244,7 +244,7 @@ static void enumerate_common(char *fname, int bus_no, int host_no, */ int sg_initialize(char msg[1024], int flag) { - /* nothing to be done */ + strcpy(msg, "internal FreeBSD CAM adapter sg-freebsd-port"); return 1; } diff --git a/libburn/sg-freebsd.c b/libburn/sg-freebsd.c index 1f86735..7f56d84 100644 --- a/libburn/sg-freebsd.c +++ b/libburn/sg-freebsd.c @@ -64,7 +64,7 @@ int mmc_function_spy(struct burn_drive *d, char * text); */ int sg_initialize(char msg[1024], int flag) { - /* nothing to be done */ + strcpy(msg, "internal FreeBSD CAM adapter sg-freebsd"); return 1; } diff --git a/libburn/sg-libcdio.c b/libburn/sg-libcdio.c index eadc2d9..bdd1dc1 100644 --- a/libburn/sg-libcdio.c +++ b/libburn/sg-libcdio.c @@ -223,8 +223,8 @@ int sg_initialize(char msg[1024], int flag) char *version_text, *msg_pt; int cdio_ver; - sprintf(msg, "Using sg-libcdio-%d with libcdio version ", - LIBCDIO_VERSION_NUM ); + sprintf(msg, "sg-libcdio adapter v%d with libcdio version ", + LIBCDIO_VERSION_NUM); #if LIBCDIO_VERSION_NUM < 83 diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index 088d054..d2784bb 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -1421,7 +1421,7 @@ static void enumerate_common(char *fname, int bus_no, int host_no, */ int sg_initialize(char msg[1024], int flag) { - /* nothing to be done */ + strcpy(msg, "internal Linux SG_IO adapter sg-linux"); return 1; }