xorriso  1.5.4.pl02
About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.
  Fossies Dox: xorriso-1.5.4.pl02.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

libdax_msgs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LIBDAX_MSGS_H_INCLUDED   1
 
#define LIBDAX_MSGS_SEV_ALL   0x00000000
 
#define LIBDAX_MSGS_SEV_ERRFILE   0x08000000
 
#define LIBDAX_MSGS_SEV_DEBUG   0x10000000
 
#define LIBDAX_MSGS_SEV_UPDATE   0x20000000
 
#define LIBDAX_MSGS_SEV_NOTE   0x30000000
 
#define LIBDAX_MSGS_SEV_HINT   0x40000000
 
#define LIBDAX_MSGS_SEV_WARNING   0x50000000
 
#define LIBDAX_MSGS_SEV_SORRY   0x60000000
 
#define LIBDAX_MSGS_SEV_MISHAP   0x64000000
 
#define LIBDAX_MSGS_SEV_FAILURE   0x68000000
 
#define LIBDAX_MSGS_SEV_FATAL   0x70000000
 
#define LIBDAX_MSGS_SEV_ABORT   0x71000000
 
#define LIBDAX_MSGS_SEV_NEVER   0x7fffffff
 
#define LIBDAX_MSGS_PRIO_ZERO   0x00000000
 
#define LIBDAX_MSGS_PRIO_LOW   0x10000000
 
#define LIBDAX_MSGS_PRIO_MEDIUM   0x20000000
 
#define LIBDAX_MSGS_PRIO_HIGH   0x30000000
 
#define LIBDAX_MSGS_PRIO_TOP   0x7ffffffe
 
#define LIBDAX_MSGS_PRIO_NEVER   0x7fffffff
 
#define LIBDAX_MSGS_ORIGIN_DRIVE_BASE   0
 
#define LIBDAX_MSGS_ORIGIN_DRIVE_TOP   0xfffff
 
#define LIBDAX_MSGS_ORIGIN_IMAGE_BASE   0x100000
 
#define LIBDAX_MSGS_ORIGIN_IMAGE_TOP   0x1fffff
 

Functions

int libdax_msgs_new (struct libdax_msgs **m, int flag)
 
int libdax_msgs_destroy (struct libdax_msgs **m, int flag)
 
int libdax_msgs_refer (struct libdax_msgs **pt, struct libdax_msgs *o, int flag)
 
int libdax_msgs_submit (struct libdax_msgs *m, int origin, int error_code, int severity, int priority, char *msg_text, int os_errno, int flag)
 
int libdax_msgs__sev_to_text (int severity, char **severity_name, int flag)
 
int libdax_msgs__text_to_sev (char *severity_name, int *severity, int flag)
 
int libdax_msgs_set_severities (struct libdax_msgs *m, int queue_severity, int print_severity, char *print_id, int flag)
 
int libdax_msgs_obtain (struct libdax_msgs *m, struct libdax_msgs_item **item, int severity, int priority, int flag)
 
int libdax_msgs_destroy_item (struct libdax_msgs *m, struct libdax_msgs_item **item, int flag)
 
int libdax_msgs_item_get_msg (struct libdax_msgs_item *item, int *error_code, char **msg_text, int *os_errno, int flag)
 
int libdax_msgs_item_get_origin (struct libdax_msgs_item *item, double *timestamp, pid_t *process_id, int *origin, int flag)
 
int libdax_msgs_item_get_rank (struct libdax_msgs_item *item, int *severity, int *priority, int flag)
 

Macro Definition Documentation

◆ LIBDAX_MSGS_H_INCLUDED

#define LIBDAX_MSGS_H_INCLUDED   1

Definition at line 67 of file libdax_msgs.h.

◆ LIBDAX_MSGS_ORIGIN_DRIVE_BASE

#define LIBDAX_MSGS_ORIGIN_DRIVE_BASE   0

Definition at line 245 of file libdax_msgs.h.

◆ LIBDAX_MSGS_ORIGIN_DRIVE_TOP

#define LIBDAX_MSGS_ORIGIN_DRIVE_TOP   0xfffff

Definition at line 246 of file libdax_msgs.h.

◆ LIBDAX_MSGS_ORIGIN_IMAGE_BASE

#define LIBDAX_MSGS_ORIGIN_IMAGE_BASE   0x100000

Definition at line 249 of file libdax_msgs.h.

◆ LIBDAX_MSGS_ORIGIN_IMAGE_TOP

#define LIBDAX_MSGS_ORIGIN_IMAGE_TOP   0x1fffff

Definition at line 250 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_HIGH

#define LIBDAX_MSGS_PRIO_HIGH   0x30000000

Definition at line 237 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_LOW

#define LIBDAX_MSGS_PRIO_LOW   0x10000000

Definition at line 235 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_MEDIUM

#define LIBDAX_MSGS_PRIO_MEDIUM   0x20000000

Definition at line 236 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_NEVER

#define LIBDAX_MSGS_PRIO_NEVER   0x7fffffff

Definition at line 241 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_TOP

#define LIBDAX_MSGS_PRIO_TOP   0x7ffffffe

Definition at line 238 of file libdax_msgs.h.

◆ LIBDAX_MSGS_PRIO_ZERO

#define LIBDAX_MSGS_PRIO_ZERO   0x00000000

Definition at line 234 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_ABORT

#define LIBDAX_MSGS_SEV_ABORT   0x71000000

A message from an abort handler which will finally finish libburn

Definition at line 222 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_ALL

#define LIBDAX_MSGS_SEV_ALL   0x00000000

Use this to get messages of any severity. Do not use for submitting.

Definition at line 121 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_DEBUG

#define LIBDAX_MSGS_SEV_DEBUG   0x10000000

Debugging messages not to be visible to normal users by default

Definition at line 138 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_ERRFILE

#define LIBDAX_MSGS_SEV_ERRFILE   0x08000000

Messages of this severity shall transport plain disk file paths whenever an event of severity SORRY or above is related with an individual disk file. No message text shall be added to the file path. The ERRFILE message shall be issued before the human readable message which carries the true event severity. That message should contain the file path so it can be found by strstr(message, path)!=NULL. The error code shall be the same as with the human readable message.

Definition at line 133 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_FAILURE

#define LIBDAX_MSGS_SEV_FAILURE   0x68000000

Non-fatal error indicating that an important part of an action failed and that only a new setup of preconditions will give hope for sufficient success.

E.g.: No media is inserted in the output drive. No write mode can be found for inserted media. A libisofs input file is inaccessible during grafting.

After FAILURE a function should end with a return value indicating failure. It is at the discretion of the function whether it ends immediately in any case or whether it tries to go on if the eventual threshold allows.

Definition at line 205 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_FATAL

#define LIBDAX_MSGS_SEV_FATAL   0x70000000

An error message which puts the whole operation of the program in question

E.g.: Not enough memory for essential temporary objects. Irregular errors from resources. Programming errors (soft assert).

After FATAL a function should end very soon with a return value indicating severe failure.

Definition at line 217 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_HINT

#define LIBDAX_MSGS_SEV_HINT   0x40000000

Possibilities to achieve a better result

Definition at line 150 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_MISHAP

#define LIBDAX_MSGS_SEV_MISHAP   0x64000000

A FAILURE (see below) which can be tolerated during long lasting operations just because they cannot simply be stopped or revoked.

xorriso converts libisofs SORRY messages issued during image generation into MISHAP messages in order to allow its evaluators to distinguish image generation problems from minor image composition problems. E.g.: A libisofs input file is inaccessible during image generation.

After a MISHAP a function should behave like after SORRY.

Definition at line 190 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_NEVER

#define LIBDAX_MSGS_SEV_NEVER   0x7fffffff

A severity to exclude resp. discard any possible message. Do not use this severity for submitting.

Definition at line 227 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_NOTE

#define LIBDAX_MSGS_SEV_NOTE   0x30000000

Not so usual events which were gracefully handled

Definition at line 146 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_SORRY

#define LIBDAX_MSGS_SEV_SORRY   0x60000000

Non-fatal error messages indicating that parts of an action failed but processing may go on if one accepts deviations from the desired result.

SORRY may also be the severity for incidents which are severe enough for FAILURE but happen within already started irrevocable actions, like ISO image generation. A precondition for such a severity ease is that the action can be continued after the incident. See below MISHAP for what xorriso would need instead of this kind of SORRY and generates for itself in case of libisofs image generation.

E.g.: A pattern yields no result. A speed setting cannot be made. A libisofs input file is inaccessible during image generation.

After SORRY a function should try to go on if that makes any sense and if no threshold prescribes abort on SORRY. The function should nevertheless indicate some failure in its return value. It should - but it does not have to.

Definition at line 176 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_UPDATE

#define LIBDAX_MSGS_SEV_UPDATE   0x20000000

Update of a progress report about long running actions

Definition at line 142 of file libdax_msgs.h.

◆ LIBDAX_MSGS_SEV_WARNING

#define LIBDAX_MSGS_SEV_WARNING   0x50000000

Warnings about problems which could not be handled optimally

Definition at line 154 of file libdax_msgs.h.

Function Documentation

◆ libdax_msgs__sev_to_text()

int libdax_msgs__sev_to_text ( int  severity,
char **  severity_name,
int  flag 
)

Convert a registered severity number into a severity name

Parameters
flagBitfield for control purposes: bit0= list all severity names in a blank separated string
Returns
>0 success, <=0 failure

Definition at line 287 of file libdax_msgs.c.

References LIBDAX_MSGS_SEV_ABORT, LIBDAX_MSGS_SEV_ALL, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_SEV_ERRFILE, LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_SEV_HINT, LIBDAX_MSGS_SEV_MISHAP, LIBDAX_MSGS_SEV_NEVER, LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_SEV_UPDATE, and LIBDAX_MSGS_SEV_WARNING.

Referenced by burn_list_sev_texts(), burn_msgs_obtain(), burn_sev_to_text(), and libdax_msgs_submit().

◆ libdax_msgs__text_to_sev()

int libdax_msgs__text_to_sev ( char *  severity_name,
int *  severity,
int  flag 
)

◆ libdax_msgs_destroy()

int libdax_msgs_destroy ( struct libdax_msgs **  m,
int  flag 
)

Destroy a message handling facility and all its eventual messages. The submitted pointer gets set to NULL. Actually only the last destroy call of all official references to the object will really dispose it. All others just decrement the reference counter. Call this function only with official reference pointers obtained by libdax_msgs_new() or libdax_msgs_refer(), and only once per such pointer.

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 for success, 0 for pointer to NULL, -1 for fatal error

Definition at line 191 of file libdax_msgs.c.

References libdax_msgs_item_destroy(), libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_finish(), and burn_set_messenger().

◆ libdax_msgs_destroy_item()

int libdax_msgs_destroy_item ( struct libdax_msgs *  m,
struct libdax_msgs_item **  item,
int  flag 
)

Destroy a message item obtained by libdax_msgs_obtain(). The submitted pointer gets set to NULL. Caution: Copy eventually obtained msg_text before destroying the item, if you want to use it further.

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 for success, 0 for pointer to NULL, <0 for severe errors

Definition at line 437 of file libdax_msgs.c.

References libdax_msgs_item_destroy(), libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_msgs_obtain().

◆ libdax_msgs_item_get_msg()

int libdax_msgs_item_get_msg ( struct libdax_msgs_item *  item,
int *  error_code,
char **  msg_text,
int *  os_errno,
int  flag 
)

Obtain from a message item the three application oriented components as submitted with the originating call of libdax_msgs_submit(). Caution: msg_text becomes a pointer into item, not a copy.

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 on success, 0 on invalid item, <0 for servere errors

Definition at line 104 of file libdax_msgs.c.

Referenced by burn_msgs_obtain().

◆ libdax_msgs_item_get_origin()

int libdax_msgs_item_get_origin ( struct libdax_msgs_item *  item,
double *  timestamp,
pid_t *  process_id,
int *  origin,
int  flag 
)

Obtain from a message item the submitter identification submitted with the originating call of libdax_msgs_submit().

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 on success, 0 on invalid item, <0 for servere errors

Definition at line 115 of file libdax_msgs.c.

◆ libdax_msgs_item_get_rank()

int libdax_msgs_item_get_rank ( struct libdax_msgs_item *  item,
int *  severity,
int *  priority,
int  flag 
)

Obtain from a message item severity and priority as submitted with the originating call of libdax_msgs_submit().

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 on success, 0 on invalid item, <0 for servere errors

Definition at line 126 of file libdax_msgs.c.

Referenced by burn_msgs_obtain().

◆ libdax_msgs_new()

int libdax_msgs_new ( struct libdax_msgs **  m,
int  flag 
)

Create new empty message handling facility with queue and issue a first official reference to it.

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
>0 success, <=0 failure

Definition at line 138 of file libdax_msgs.c.

References LIBDAX_MSGS_SEV_ALL, and LIBDAX_MSGS_SEV_NEVER.

Referenced by burn_msgs_initialize().

◆ libdax_msgs_obtain()

int libdax_msgs_obtain ( struct libdax_msgs *  m,
struct libdax_msgs_item **  item,
int  severity,
int  priority,
int  flag 
)

Obtain a message item that has at least the given severity and priority. Usually all older messages of lower severity are discarded then. If no item of sufficient severity was found, all others are discarded from the queue.

Parameters
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 if a matching item was found, 0 if not, <0 for severe errors

Definition at line 403 of file libdax_msgs.c.

References libdax_msgs_item_destroy(), libdax_msgs_item_unlink(), libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_msgs_obtain().

◆ libdax_msgs_refer()

int libdax_msgs_refer ( struct libdax_msgs **  pt,
struct libdax_msgs *  o,
int  flag 
)

Create an official reference to an existing libdax_msgs object. The references keep the object alive at least until it is released by a matching number of destroy calls. So each reference MUST be revoked by exactly one call to libdax_msgs_destroy().

Parameters
ptThe pointer to be set and registered
mA pointer to the existing object
flagBitfield for control purposes (unused yet, submit 0)
Returns
1 for success, 0 for failure

Definition at line 225 of file libdax_msgs.c.

References libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_set_messenger().

◆ libdax_msgs_set_severities()

int libdax_msgs_set_severities ( struct libdax_msgs *  m,
int  queue_severity,
int  print_severity,
char *  print_id,
int  flag 
)

Set minimum severity for messages to be queued (default LIBDAX_MSGS_SEV_ALL) and for messages to be printed directly to stderr (default LIBDAX_MSGS_SEV_NEVER).

Parameters
print_idA text of at most 80 characters to be printed before any eventually printed message (default is "libdax: ").
flagBitfield for control purposes (unused yet, submit 0)
Returns
always 1 for now

Definition at line 236 of file libdax_msgs.c.

References libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_msgs_initialize(), and burn_msgs_set_severities().

◆ libdax_msgs_submit()

int libdax_msgs_submit ( struct libdax_msgs *  m,
int  origin,
int  error_code,
int  severity,
int  priority,
char *  msg_text,
int  os_errno,
int  flag 
)

Submit a message to a message handling facility.

Parameters
originprogram specific identification number of the originator of a message. E.g. drive number. Programs should have an own range of origin numbers. See above LIBDAX_MSGS_ORIGIN_*_BASE Use -1 if no number is known.
error_codeUnique error code. Use only registered codes. See below. The same unique error_code may be issued at different occasions but those should be equivalent out of the view of a libdax_msgs application. (E.g. "cannot open ATA drive" versus "cannot open SCSI drive" would be equivalent.)
severityThe LIBDAX_MSGS_SEV_* of the event.
priorityThe LIBDAX_MSGS_PRIO_* number of the event.
msg_textPrintable and human readable message text.
os_errnoEventual error code from operating system (0 if none)
flagBitfield for control purposes bit0= If direct output to stderr: CarriageReturn rather than LineFeed
Returns
1 on success, 0 on rejection, <0 for severe errors

Definition at line 334 of file libdax_msgs.c.

References libdax_msgs__sev_to_text(), libdax_msgs_item_destroy(), libdax_msgs_item_new(), libdax_msgs_lock(), and libdax_msgs_unlock().

Referenced by burn_alloc_mem(), burn_builtin_abort_handler(), burn_cdtext_check_blockno(), burn_cdtext_from_packfile(), burn_cdtext_get(), burn_cdtext_set(), burn_create_new_pack(), burn_create_toc_entries(), burn_disc_cd_toc_extensions(), burn_disc_close_damaged(), burn_disc_close_session_dvd_minus_r(), burn_disc_close_track_dvd_minus_r(), burn_disc_close_track_dvd_plus_r(), burn_disc_erase(), burn_disc_erase_sync(), burn_disc_finalize_dvd_plus_r(), burn_disc_format(), burn_disc_format_sync(), burn_disc_get_msc1(), burn_disc_open_track_dvd_minus_r(), burn_disc_open_track_dvd_plus_r(), burn_disc_read_atip(), burn_disc_setup_dvd_minus_rw(), burn_disc_track_lba_nwa(), burn_disc_write(), burn_disc_write_is_ok(), burn_disc_write_sync(), burn_drive_adr_debug_msg(), burn_drive_cancel(), burn_drive_d_get_adr(), burn_drive_extract_audio(), burn_drive_extract_audio_track(), burn_drive_finish_enum(), burn_drive_grab(), burn_drive_grab_dummy(), burn_drive_re_assess(), burn_drive_release_fl(), burn_drive_reset_simulate(), burn_drive_scan(), burn_drive_scan_and_grab(), burn_drive_scan_sync(), burn_drive_set_stream_recording(), burn_dvd_write_session(), burn_dvd_write_sync(), burn_fifo_fill_data(), burn_fifo_inquire_status(), burn_fifo_source_new(), burn_fifo_source_shoveller(), burn_finish(), burn_initialize(), burn_make_v07t(), burn_msgs_submit(), burn_offst_source_new(), burn_os_alloc_buffer(), burn_os_open_track_src(), burn_precheck_write(), burn_random_access_write(), burn_read_audio(), burn_read_data(), burn_scsi_setup_drive(), burn_session_by_cue_file(), burn_session_input_sheet_v07t(), burn_session_set_start_tno(), burn_stdio_mmc_write(), burn_stdio_open_write(), burn_stdio_read(), burn_stdio_seek(), burn_stdio_sync_cache(), burn_stdio_write(), burn_structure_print_disc(), burn_structure_print_session(), burn_structure_print_track(), burn_track_apply_fillup(), burn_track_define_data(), burn_track_set_index(), burn_track_set_isrc(), burn_track_set_isrc_string(), burn_write_close_session(), burn_write_close_track(), burn_write_leadin_cdtext(), burn_write_opts_clone(), burn_write_opts_new(), burn_write_opts_set_leadin_text(), burn_write_opts_set_write_type(), burn_write_track(), burn_write_track_minsize(), cue_attach_track(), cue_check_for_track(), cue_create_file_source(), cue_interpret_line(), cue_open_audioxtr(), cue_read_number(), cue_read_timepoint_lba(), cue_set_cdtext(), evaluate_transport_success(), fifo_free(), fifo_read(), fname_enumerate(), get_bytes(), libdax_audioxtr_open(), mmc_close(), mmc_close_disc(), mmc_close_session(), mmc_compose_mode_page_5(), mmc_eval_read_error(), mmc_fake_toc(), mmc_format_unit(), mmc_function_spy(), mmc_get_configuration_al(), mmc_get_nwa(), mmc_get_phys_format_info(), mmc_read_10(), mmc_read_disc_info_al(), mmc_read_disc_structure(), mmc_read_toc_al(), mmc_read_toc_fmt0_al(), mmc_reserve_track(), mmc_set_streaming(), mmc_sync_cache(), mmc_wait_for_buffer_free(), mmc_write(), new_cue(), next_enum_cXtYdZs2(), offst_auth(), proc_sys_dev_cdrom_info(), react_on_drive_loss(), remove_worker(), report_block(), scsi_enumerate_drives(), scsi_eval_cmd_outcome(), scsi_notify_error(), sector_headers(), sg_close_drive_fd(), sg_exchange_scd_for_sr(), sg_fcntl_lock(), sg_grab(), sg_handle_busy_device(), sg_initialize(), sg_issue_command(), sg_lock(), sg_obtain_scsi_adr(), sg_open_drive_fd(), sg_open_scsi_siblings(), sg_os_revalidate_disc(), sg_release_siblings(), sg_solaris_convert_devname(), sgio_inquiry_cd_drive(), single_enumerate(), spc_confirm_cd_drive(), spc_report_async_error(), spc_sense_caps_al(), spc_wait_unit_attention(), start_enum_cXtYdZs2(), v07t_cdtext_char_code(), v07t_cdtext_genre_code(), v07t_cdtext_lang_code(), and write_disc_worker_func().