From a25963775f1ff5cff8972d6f05cf49965db6aebf Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 2 Nov 2007 14:37:31 +0000 Subject: [PATCH] Made -abort_on and -report_about complain with bad severity names --- libisoburn/trunk/test/xorriso.c | 16 ++++++++++++++-- libisoburn/trunk/test/xorriso_timestamp.h | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/libisoburn/trunk/test/xorriso.c b/libisoburn/trunk/test/xorriso.c index 3c9cafef..f7b083ad 100644 --- a/libisoburn/trunk/test/xorriso.c +++ b/libisoburn/trunk/test/xorriso.c @@ -3121,10 +3121,16 @@ int Xorriso_eval_problem_status(struct XorrisO *xorriso, int ret, int flag) int Xorriso_option_abort_on(struct XorrisO *xorriso, char *severity, int flag) { int ret, sev; + char sfe[4*SfileadrL]; ret= Xorriso__text_to_sev(severity, &sev, 0); - if(ret<=0) + if(ret<=0) { + sprintf(xorriso->info_text, + "-abort_on: Not a known severity name : %s", + Text_shellsafe(severity, sfe, 0)); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); return(ret); + } if(Sfile_str(xorriso->abort_on_text,severity,0)<=0) return(-1); xorriso->abort_on_severity= sev; @@ -4548,10 +4554,16 @@ int Xorriso_option_report_about(struct XorrisO *xorriso, char *severity, int flag) { int ret, sev; + char sfe[4*SfileadrL]; ret= Xorriso__text_to_sev(severity, &sev, 0); - if(ret<=0) + if(ret<=0) { + sprintf(xorriso->info_text, + "-report_about: Not a known severity name : %s", + Text_shellsafe(severity, sfe, 0)); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "WARNING", 0); return(ret); + } if(Sfile_str(xorriso->report_about_text,severity,0)<=0) return(-1); xorriso->report_about_severity= sev; diff --git a/libisoburn/trunk/test/xorriso_timestamp.h b/libisoburn/trunk/test/xorriso_timestamp.h index 1089eb63..5c0c9526 100644 --- a/libisoburn/trunk/test/xorriso_timestamp.h +++ b/libisoburn/trunk/test/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2007.11.02.143549" +#define Xorriso_timestamP "2007.11.02.143658"