Allowed lowercase severity names for all occasions
This commit is contained in:
parent
53238362ac
commit
a5344bfb57
@ -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 Xorriso__text_to_sev(char *severity_name, int *severity_number, int flag)
|
||||||
{
|
{
|
||||||
int ret= 1;
|
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)
|
if(ret>0)
|
||||||
return(ret);
|
return(ret);
|
||||||
ret= burn_text_to_sev(severity_name, severity_number, 0);
|
ret= burn_text_to_sev(severity, severity_number, 0);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
|
|||||||
char *severity, int flag)
|
char *severity, int flag)
|
||||||
{
|
{
|
||||||
int ret, sev;
|
int ret, sev;
|
||||||
char *sev_text= "";
|
char *sev_text= "", off_severity[20];
|
||||||
|
|
||||||
if(strlen(pattern)>=sizeof(xorriso->assert_volid)) {
|
if(strlen(pattern)>=sizeof(xorriso->assert_volid)) {
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
@ -427,6 +427,8 @@ int Xorriso_option_assert_volid(struct XorrisO *xorriso, char *pattern,
|
|||||||
sev_text= severity;
|
sev_text= severity;
|
||||||
if(strcmp(sev_text, "NEVER") == 0)
|
if(strcmp(sev_text, "NEVER") == 0)
|
||||||
sev_text= "ABORT";
|
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);
|
ret= Xorriso__text_to_sev(sev_text, &sev, 0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
sprintf(xorriso->info_text, "-assert_volid: Not a known severity name : ");
|
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 ret, i, mem_pci, end_idx, fret, sev, do_report= 0;
|
||||||
int optc= 0;
|
int optc= 0;
|
||||||
char **optv= NULL, *cpt, *severity= "ALL";
|
char **optv= NULL, *cpt, *severity= "ALL", off_severity[20];
|
||||||
struct FindjoB *job= NULL;
|
struct FindjoB *job= NULL;
|
||||||
double mem_lut= 0.0;
|
double mem_lut= 0.0;
|
||||||
|
|
||||||
@ -1297,6 +1299,8 @@ int Xorriso_option_check_md5(struct XorrisO *xorriso,
|
|||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
severity= argv[*idx];
|
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);
|
ret= Xorriso__text_to_sev(severity, &sev, 0);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
sprintf(xorriso->info_text, "-check_md5: Not a known severity name : ");
|
sprintf(xorriso->info_text, "-check_md5: Not a known severity name : ");
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2011.10.05.172142"
|
#define Xorriso_timestamP "2011.10.05.173150"
|
||||||
|
Loading…
Reference in New Issue
Block a user