From 29d630b1411c61f7f7d8776dd91464ac6e67653f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 27 Sep 2006 12:04:53 +0000 Subject: [PATCH] Disabled but did not discarded failed attempt to lock against growisofs --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.h | 1 + libburn/init.c | 3 ++- libburn/libburn.h | 2 +- libburn/transport.h | 6 ++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index c2b0f98..8f9f5a6 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2006.09.27.115919" +#define Cdrskin_timestamP "2006.09.27.120656" diff --git a/libburn/drive.h b/libburn/drive.h index 2714658..0adaa5e 100644 --- a/libburn/drive.h +++ b/libburn/drive.h @@ -35,6 +35,7 @@ struct mempage; SESSION_LEADOUT_ENTRY((d), (d)->toc->sessions-1)) struct burn_drive *burn_drive_register(struct burn_drive *); +int burn_drive_unregister(struct burn_drive *d); unsigned int burn_drive_count(void); void burn_wait_all(void); diff --git a/libburn/init.c b/libburn/init.c index 0997ff1..2e9c83d 100644 --- a/libburn/init.c +++ b/libburn/init.c @@ -91,6 +91,7 @@ void burn_finish(void) and try to mark them busy if opened sucessfully. (O_EXCL) There are kernels which simply don't care about O_EXCL. Some have it off, some have it on, some are switchable. + Values: 0=off, 1=on, 2=on,O_EXCL scsi siblings (sr,scd,st) @param blocking Try to wait for drives which do not open immediately but also do not return an error as well. (O_NONBLOCK) This might stall indefinitely with /dev/hdX hard disks. @@ -104,7 +105,7 @@ void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy) { assert(burn_running); - burn_sg_open_o_excl= !!exclusive; + burn_sg_open_o_excl= exclusive; burn_sg_open_o_nonblock= !blocking; burn_sg_open_abort_busy= !!abort_on_busy; } diff --git a/libburn/libburn.h b/libburn/libburn.h index 7a65939..32a4bb3 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -1019,7 +1019,7 @@ void burn_version(int *major, int *minor, int *micro); Default: "NEVER". If you queue messages then you must consume them by burn_msgs_obtain(). @param print_severity Does the same for messages to be printed directly - to stderr. + to stderr. Default: "FATAL". @param print_id A text prefix to be printed before the message. @return >0 for success, <=0 for error diff --git a/libburn/transport.h b/libburn/transport.h index fb71ad8..cbb5027 100644 --- a/libburn/transport.h +++ b/libburn/transport.h @@ -90,6 +90,8 @@ struct scsi_mode_data }; +#define LIBBURN_SG_MAX_SIBLINGS 16 + /** Gets initialized in enumerate_common() and burn_drive_register() */ struct burn_drive { @@ -100,6 +102,10 @@ struct burn_drive char *devname; int fd; + /* ts A60926 : trying to lock against growisofs /dev/srN, /dev/scdN */ + int sibling_count; + int sibling_fds[LIBBURN_SG_MAX_SIBLINGS]; + /* ts A60904 : ticket 62, contribution by elmom */ /** Tells the index in scanned burn_drive_info array.