Allowed lowercase severity names for all occasions

This commit is contained in:
Thomas Schmitt 2011-10-05 17:32:26 +00:00
parent 4f16e31e19
commit 9dffcef1b7
3 changed files with 11 additions and 5 deletions

View File

@ -365,11 +365,13 @@ int Xorriso__sev_to_text(int severity, char **severity_name,
int Xorriso__text_to_sev(char *severity_name, int *severity_number, int flag)
{
int ret= 1;
char severity[20];
ret= iso_text_to_sev(severity_name, severity_number);
Xorriso__to_upper(severity_name, severity, (int) sizeof(severity), 0);
ret= iso_text_to_sev(severity, severity_number);
if(ret>0)
return(ret);
ret= burn_text_to_sev(severity_name, severity_number, 0);
ret= burn_text_to_sev(severity, severity_number, 0);
return(ret);
}

View File

@ -403,7 +403,7 @@ int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
char *severity, int flag)
{
int ret, sev;
char *sev_text= "";
char *sev_text= "", off_severity[20];
if(strlen(pattern)>=sizeof(xorriso->assert_volid)) {
sprintf(xorriso->info_text,
@ -427,6 +427,8 @@ int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
sev_text= severity;
if(strcmp(sev_text, "NEVER") == 0)
sev_text= "ABORT";
Xorriso__to_upper(sev_text, off_severity, (int) sizeof(off_severity), 0);
sev_text= off_severity;
ret= Xorriso__text_to_sev(sev_text, &sev, 0);
if(ret<=0) {
sprintf(xorriso->info_text, "-assert_volid: Not a known severity name : ");
@ -1278,7 +1280,7 @@ int Xorriso_option_check_md5(struct XorrisO *xorriso,
{
int ret, i, mem_pci, end_idx, fret, sev, do_report= 0;
int optc= 0;
char **optv= NULL, *cpt, *severity= "ALL";
char **optv= NULL, *cpt, *severity= "ALL", off_severity[20];
struct FindjoB *job= NULL;
double mem_lut= 0.0;
@ -1297,6 +1299,8 @@ int Xorriso_option_check_md5(struct XorrisO *xorriso,
ret= 0; goto ex;
}
severity= argv[*idx];
Xorriso__to_upper(severity, off_severity, (int) sizeof(off_severity), 0);
severity= off_severity;
ret= Xorriso__text_to_sev(severity, &sev, 0);
if(ret<=0) {
sprintf(xorriso->info_text, "-check_md5: Not a known severity name : ");

View File

@ -1 +1 @@
#define Xorriso_timestamP "2011.10.05.172142"
#define Xorriso_timestamP "2011.10.05.173150"