2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
/* os-linux.h
|
|
|
|
Operating system specific libburn definitions and declarations. Included
|
|
|
|
by os.h in case of compilation for
|
2010-02-12 21:26:46 +00:00
|
|
|
Linux kernels 2.4 and 2.6, GNU/Linux SCSI Generic (sg)
|
2006-11-16 11:17:55 +00:00
|
|
|
|
2013-07-21 17:07:53 +00:00
|
|
|
Copyright (C) 2006 - 2013 Thomas Schmitt <scdbackup@gmx.net>
|
2010-02-14 08:45:14 +00:00
|
|
|
Provided under GPL version 2 or later.
|
2006-11-16 11:17:55 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/** List of all signals which shall be caught by signal handlers and trigger
|
|
|
|
a graceful abort of libburn. (See man 7 signal.)
|
|
|
|
*/
|
|
|
|
/* Once as system defined macros */
|
|
|
|
#define BURN_OS_SIGNAL_MACRO_LIST \
|
|
|
|
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, \
|
|
|
|
SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM, \
|
2013-07-21 17:07:53 +00:00
|
|
|
SIGUSR1, SIGUSR2, SIGXCPU, SIGBUS, SIGPOLL, \
|
|
|
|
SIGPROF, SIGSYS, SIGTRAP, SIGVTALRM, SIGXCPU, \
|
|
|
|
SIGXFSZ
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
/* Once as text 1:1 list of strings for messages and interpreters */
|
|
|
|
#define BURN_OS_SIGNAL_NAME_LIST \
|
|
|
|
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGABRT", \
|
|
|
|
"SIGFPE", "SIGSEGV", "SIGPIPE", "SIGALRM", "SIGTERM", \
|
2013-07-21 17:07:53 +00:00
|
|
|
"SIGUSR1", "SIGUSR2", "SIGXCPU", "SIGBUS", "SIGPOLL", \
|
|
|
|
"SIGPROF", "SIGSYS", "SIGTRAP", "SIGVTALRM", "SIGXCPU", \
|
|
|
|
"SIGXFSZ"
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
/* The number of above list items */
|
2013-07-21 17:07:53 +00:00
|
|
|
#define BURN_OS_SIGNAL_COUNT 21
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
/** To list all signals which shall surely not be caught */
|
|
|
|
#define BURN_OS_NON_SIGNAL_MACRO_LIST \
|
2013-07-21 17:07:53 +00:00
|
|
|
SIGKILL, SIGCHLD, SIGSTOP, SIGTSTP, SIGCONT, SIGURG, SIGWINCH, SIGTTIN, SIGTTOU
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
/* The number of above list items */
|
2013-07-21 17:07:53 +00:00
|
|
|
#define BURN_OS_NON_SIGNAL_COUNT 9
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* The maximum size for a (SCSI) i/o transaction */
|
2007-01-08 10:30:30 +00:00
|
|
|
/* Important : MUST be at least 32768 ! */
|
2007-05-28 13:24:33 +00:00
|
|
|
/* ts A70523 : >32k seems not good with kernel 2.4 USB drivers and audio
|
2008-04-15 09:42:32 +00:00
|
|
|
#define BURN_OS_TRANSPORT_BUFFER_SIZE 32768
|
|
|
|
*/
|
|
|
|
/* ts A80414 : curbed in write.c CD media to Libburn_cd_obS = 32 kiB
|
|
|
|
re-enlarged transport to 64 kiB for BD-RE experiments
|
2007-05-28 13:24:33 +00:00
|
|
|
*/
|
2008-04-15 09:42:32 +00:00
|
|
|
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
|
2008-08-05 18:00:37 +00:00
|
|
|
/* To hold the position of the most recently delivered address from
|
2006-11-16 11:17:55 +00:00
|
|
|
device enumeration.
|
|
|
|
*/
|
2008-08-05 18:00:37 +00:00
|
|
|
struct burn_drive_enumerator_struct {
|
|
|
|
int pos;
|
|
|
|
int info_count;
|
|
|
|
char **info_list;
|
|
|
|
};
|
|
|
|
|
2006-11-16 11:17:55 +00:00
|
|
|
#define BURN_OS_DEFINE_DRIVE_ENUMERATOR_T \
|
2008-08-05 18:00:37 +00:00
|
|
|
typedef struct burn_drive_enumerator_struct burn_drive_enumerator_t;
|
2006-11-16 11:17:55 +00:00
|
|
|
|
|
|
|
|
2007-04-09 10:54:17 +00:00
|
|
|
/* Parameters for sibling list. See sibling_fds, sibling_fnames */
|
|
|
|
#define BURN_OS_SG_MAX_SIBLINGS 5
|
|
|
|
#define BURN_OS_SG_MAX_NAMELEN 16
|
|
|
|
|
2006-11-16 11:17:55 +00:00
|
|
|
/* The list of operating system dependent elements in struct burn_drive.
|
|
|
|
Usually they are initialized in sg-*.c:enumerate_common().
|
|
|
|
*/
|
|
|
|
#define BURN_OS_TRANSPORT_DRIVE_ELEMENTS \
|
|
|
|
int fd; \
|
|
|
|
\
|
|
|
|
/* ts A60926 : trying to lock against growisofs /dev/srN, /dev/scdN */ \
|
|
|
|
int sibling_count; \
|
2007-04-09 10:54:17 +00:00
|
|
|
int sibling_fds[BURN_OS_SG_MAX_SIBLINGS]; \
|
|
|
|
/* ts A70409 : DDLP */ \
|
|
|
|
char sibling_fnames[BURN_OS_SG_MAX_SIBLINGS][BURN_OS_SG_MAX_NAMELEN];
|
2006-11-16 11:17:55 +00:00
|
|
|
|