From 75b8d0bcb839f58239805af6f6b0a5b550163c5a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 14 Dec 2012 14:51:46 +0000 Subject: [PATCH] New API call burn_list_sev_texts() --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/init.c | 11 +++++++++++ libburn/trunk/libburn/libburn.h | 11 ++++++++++- libburn/trunk/libburn/libburn.ver | 1 + libburn/trunk/libburn/libdax_msgs.c | 2 +- libburn/trunk/libburn/libdax_msgs.h | 2 +- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index b81facb8..3d048189 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2012.11.30.193415" +#define Cdrskin_timestamP "2012.12.14.145101" diff --git a/libburn/trunk/libburn/init.c b/libburn/trunk/libburn/init.c index 2e4babf1..8982fa8a 100644 --- a/libburn/trunk/libburn/init.c +++ b/libburn/trunk/libburn/init.c @@ -347,6 +347,17 @@ int burn_sev_to_text(int severity_number, char **severity_name, int flag) return ret; } + +/* ts B21214 API */ +char *burn_list_sev_texts(int flag) +{ + char *sev_list; + + libdax_msgs__sev_to_text(0, &sev_list, 1); + return sev_list; +} + + /* ts B00224 */ char *burn_util_thread_id(pid_t pid, pthread_t tid, char text[80]) { diff --git a/libburn/trunk/libburn/libburn.h b/libburn/trunk/libburn/libburn.h index 1a1f2291..687afcd9 100644 --- a/libburn/trunk/libburn/libburn.h +++ b/libburn/trunk/libburn/libburn.h @@ -3589,15 +3589,24 @@ int burn_text_to_sev(char *severity_name, int *severity_number, int flag); /* ts A80202 */ /** Convert a severity number into a severity name - @since 0.4.4 @param severity_number The rank number: the higher, the more severe. @param severity_name A name as with burn_msgs_submit(), e.g. "SORRY". @param flag Bitfield for control purposes (unused yet, submit 0) + @return >0 success, <=0 failure @since 0.4.4 */ int burn_sev_to_text(int severity_number, char **severity_name, int flag); +/* ts B21214 */ +/** Return a blank separated list of severity names. Sorted from low + to high severity. + @param flag Bitfield for control purposes (unused yet, submit 0) + @return A constant string with the severity names + @since 1.2.6 +*/ +char *burn_list_sev_texts(int flag); + /* ts A70915 */ /** Replace the messenger object handle of libburn by a compatible handle diff --git a/libburn/trunk/libburn/libburn.ver b/libburn/trunk/libburn/libburn.ver index e92b7eaa..546e06dd 100644 --- a/libburn/trunk/libburn/libburn.ver +++ b/libburn/trunk/libburn/libburn.ver @@ -86,6 +86,7 @@ burn_guess_manufacturer; burn_initialize; burn_is_aborting; burn_lba_to_msf; +burn_list_sev_texts; burn_lookup_device_link; burn_msf_to_lba; burn_msf_to_sectors; diff --git a/libburn/trunk/libburn/libdax_msgs.c b/libburn/trunk/libburn/libdax_msgs.c index 5d67715b..7bfbeeef 100644 --- a/libburn/trunk/libburn/libdax_msgs.c +++ b/libburn/trunk/libburn/libdax_msgs.c @@ -289,7 +289,7 @@ int libdax_msgs__sev_to_text(int severity, char **severity_name, int flag) { if(flag&1) { - *severity_name= "NEVER\nABORT\nFATAL\nFAILURE\nMISHAP\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nERRFILE\nALL"; + *severity_name= "ALL ERRFILE DEBUG UPDATE NOTE HINT WARNING SORRY MISHAP FAILURE FATAL ABORT NEVER"; return(1); } *severity_name= ""; diff --git a/libburn/trunk/libburn/libdax_msgs.h b/libburn/trunk/libburn/libdax_msgs.h index db41fcc0..25888add 100644 --- a/libburn/trunk/libburn/libdax_msgs.h +++ b/libburn/trunk/libburn/libdax_msgs.h @@ -316,7 +316,7 @@ int libdax_msgs_submit(struct libdax_msgs *m, int origin, int error_code, /** Convert a registered severity number into a severity name @param flag Bitfield for control purposes: - bit0= list all severity names in a newline separated string + bit0= list all severity names in a blank separated string @return >0 success, <=0 failure */ int libdax_msgs__sev_to_text(int severity, char **severity_name,