Disabled but did not discarded failed attempt to lock against growisofs

This commit is contained in:
Thomas Schmitt 2006-09-27 12:04:53 +00:00
parent 886b8d1f81
commit 29d630b141
5 changed files with 11 additions and 3 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.09.27.115919"
#define Cdrskin_timestamP "2006.09.27.120656"

View File

@ -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);

View File

@ -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;
}

View File

@ -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

View File

@ -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.