2009-12-19 14:34:48 +00:00
|
|
|
|
2009-12-27 14:45:05 +00:00
|
|
|
/* os-libcdio.h
|
2009-12-19 14:34:48 +00:00
|
|
|
Operating system specific libburn definitions and declarations. Included
|
|
|
|
by os.h in case of compilation for
|
2009-12-27 14:45:05 +00:00
|
|
|
Unknown X/Open-like systems
|
2009-12-19 14:34:48 +00:00
|
|
|
with GNU libcdio MMC transport adapter sg-libcdio.c
|
|
|
|
|
2010-02-14 08:45:14 +00:00
|
|
|
Copyright (C) 2009 Thomas Schmitt <scdbackup@gmx.net>, provided under GPLv2+
|
2009-12-19 14:34:48 +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, \
|
|
|
|
SIGUSR1, SIGUSR2, SIGXCPU, SIGTSTP, SIGTTIN, \
|
|
|
|
SIGTTOU
|
|
|
|
|
|
|
|
/* 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", \
|
|
|
|
"SIGUSR1", "SIGUSR2", "SIGXCPU", "SIGTSTP", "SIGTTIN", \
|
|
|
|
"SIGTTOU"
|
|
|
|
|
|
|
|
/* The number of above list items */
|
|
|
|
#define BURN_OS_SIGNAL_COUNT 16
|
|
|
|
|
2010-06-15 15:57:11 +00:00
|
|
|
|
|
|
|
/** The list of all signals which shall surely not be caught.
|
|
|
|
It depends on the particular signal whether it can be ignored or whether
|
|
|
|
it will lead to sudden death of the process.
|
|
|
|
Some signals are not POSIX,
|
|
|
|
but nevertheless ought to be ignored if they are defined.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef SIGWINCH
|
|
|
|
#define BURN_OS_SIG_WINCH ,SIGWINCH
|
|
|
|
#define BURN_OS_SIG_WINCH_CNT 1
|
|
|
|
#else
|
|
|
|
#define BURN_OS_SIG_WINCH
|
|
|
|
#define BURN_OS_SIG_WINCH_CNT 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef SIGURG
|
|
|
|
#define BURN_OS_SIG_URG ,SIGURG
|
|
|
|
#define BURN_OS_SIG_URG_CNT 1
|
|
|
|
#else
|
|
|
|
#define BURN_OS_SIG_URG
|
|
|
|
#define BURN_OS_SIG_URG_CNT 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** The combined list of all signals which shall not be caught.
|
|
|
|
*/
|
2009-12-19 14:34:48 +00:00
|
|
|
#define BURN_OS_NON_SIGNAL_MACRO_LIST \
|
2010-06-15 15:57:11 +00:00
|
|
|
SIGKILL, SIGCHLD, SIGSTOP BURN_OS_SIG_WINCH BURN_OS_SIG_URG
|
2009-12-19 14:34:48 +00:00
|
|
|
|
|
|
|
/* The number of above list items */
|
2010-06-15 15:57:11 +00:00
|
|
|
#define BURN_OS_NON_SIGNAL_COUNT \
|
|
|
|
( 3 + BURN_OS_SIG_WINCH_CNT + BURN_OS_SIG_URG_CNT )
|
2009-12-19 14:34:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* The maximum size for a (SCSI) i/o transaction */
|
2010-01-04 13:52:57 +00:00
|
|
|
/* My Blu-ray burner LG GGW-H20 writes junk if stream recording is combined
|
|
|
|
with buffer size 32 kB. So stream recording is allowed only with size 64k.
|
2010-06-16 08:25:57 +00:00
|
|
|
Older BSD info says that 32 kB is maximum. But 64 kB seems to work well
|
|
|
|
on 8-STABLE. It is by default only used with BD in streaming mode.
|
|
|
|
So older systems should still be quite safe with this buffer max size.
|
2009-12-27 14:45:05 +00:00
|
|
|
*/
|
2010-06-16 08:25:57 +00:00
|
|
|
/* Important : MUST be at least 32768 ! */
|
2010-01-04 13:52:57 +00:00
|
|
|
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
|
2009-12-19 14:34:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* To hold the position of the most recently delivered address from
|
|
|
|
device enumeration.
|
|
|
|
*/
|
|
|
|
struct burn_drive_enumerator_struct {
|
|
|
|
char **ppsz_cd_drives;
|
|
|
|
char **pos;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define BURN_OS_DEFINE_DRIVE_ENUMERATOR_T \
|
|
|
|
typedef struct burn_drive_enumerator_struct burn_drive_enumerator_t;
|
|
|
|
|
|
|
|
|
|
|
|
/* 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 \
|
|
|
|
void *p_cdio; /* actually a pointer to CdIo_t */ \
|
2009-12-27 09:20:10 +00:00
|
|
|
char libcdio_name[4096]; /* The drive path as used by libcdio */ \
|
2009-12-19 14:34:48 +00:00
|
|
|
|