You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.9 KiB

  1. /* os-libcdio.h
  2. Operating system specific libburn definitions and declarations. Included
  3. by os.h in case of compilation for
  4. Unknown X/Open-like systems
  5. with GNU libcdio MMC transport adapter sg-libcdio.c
  6. Copyright (C) 2009 - 2013 Thomas Schmitt <scdbackup@gmx.net>
  7. Provided under GPLv2+
  8. */
  9. /** List of all signals which shall be caught by signal handlers and trigger
  10. a graceful abort of libburn. (See man 7 signal.)
  11. */
  12. /* Once as system defined macros */
  13. #define BURN_OS_SIGNAL_MACRO_LIST \
  14. SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, \
  15. SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM, \
  16. SIGUSR1, SIGUSR2, SIGXCPU
  17. /* Once as text 1:1 list of strings for messages and interpreters */
  18. #define BURN_OS_SIGNAL_NAME_LIST \
  19. "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGABRT", \
  20. "SIGFPE", "SIGSEGV", "SIGPIPE", "SIGALRM", "SIGTERM", \
  21. "SIGUSR1", "SIGUSR2", "SIGXCPU"
  22. /* The number of above list items */
  23. #define BURN_OS_SIGNAL_COUNT 13
  24. /** The list of all signals which shall surely not be caught.
  25. It depends on the particular signal whether it can be ignored or whether
  26. it will lead to sudden death of the process.
  27. Some signals are not POSIX,
  28. but nevertheless ought to be ignored if they are defined.
  29. */
  30. #ifdef SIGWINCH
  31. #define BURN_OS_SIG_WINCH ,SIGWINCH
  32. #define BURN_OS_SIG_WINCH_CNT 1
  33. #else
  34. #define BURN_OS_SIG_WINCH
  35. #define BURN_OS_SIG_WINCH_CNT 0
  36. #endif
  37. #ifdef SIGURG
  38. #define BURN_OS_SIG_URG ,SIGURG
  39. #define BURN_OS_SIG_URG_CNT 1
  40. #else
  41. #define BURN_OS_SIG_URG
  42. #define BURN_OS_SIG_URG_CNT 0
  43. #endif
  44. /** The combined list of all signals which shall not be caught.
  45. */
  46. #define BURN_OS_NON_SIGNAL_MACRO_LIST \
  47. SIGKILL, SIGCHLD, SIGSTOP, SIGTSTP, SIGCONT, SIGTTIN, SIGTTOU \
  48. BURN_OS_SIG_WINCH BURN_OS_SIG_URG
  49. /* The number of above list items */
  50. #define BURN_OS_NON_SIGNAL_COUNT \
  51. ( 7 + BURN_OS_SIG_WINCH_CNT + BURN_OS_SIG_URG_CNT )
  52. /* The maximum size for a (SCSI) i/o transaction */
  53. /* My Blu-ray burner LG GGW-H20 writes junk if stream recording is combined
  54. with buffer size 32 kB. So stream recording is allowed only with size 64k.
  55. Older BSD info says that 32 kB is maximum. But 64 kB seems to work well
  56. on 8-STABLE. It is by default only used with BD in streaming mode.
  57. So older systems should still be quite safe with this buffer max size.
  58. */
  59. /* Important : MUST be at least 32768 ! */
  60. #define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
  61. /* To hold the position of the most recently delivered address from
  62. device enumeration.
  63. */
  64. struct burn_drive_enumerator_struct {
  65. char **ppsz_cd_drives;
  66. char **pos;
  67. };
  68. #define BURN_OS_DEFINE_DRIVE_ENUMERATOR_T \
  69. typedef struct burn_drive_enumerator_struct burn_drive_enumerator_t;
  70. /* The list of operating system dependent elements in struct burn_drive.
  71. Usually they are initialized in sg-*.c:enumerate_common().
  72. */
  73. #define BURN_OS_TRANSPORT_DRIVE_ELEMENTS \
  74. void *p_cdio; /* actually a pointer to CdIo_t */ \
  75. char libcdio_name[4096]; /* The drive path as used by libcdio */ \