New entities "at_time", "before", "after", "not_after", "not_before" for commands -load, -mount, -mount_cmd, -session_string, -truncate_overwritable
This commit is contained in:
@@ -430,6 +430,16 @@ int Xorriso_decode_load_adr(struct XorrisO *xorriso, char *cmd,
|
||||
*entity_code= 3 | ((flag&1) << 16);
|
||||
else if(strcmp(adr_mode, "volid")==0)
|
||||
*entity_code= 4;
|
||||
else if(strcmp(adr_mode, "at_time")==0)
|
||||
*entity_code= 5;
|
||||
else if(strcmp(adr_mode, "not_after")==0)
|
||||
*entity_code= 6;
|
||||
else if(strcmp(adr_mode, "not_before")==0)
|
||||
*entity_code= 7;
|
||||
else if(strcmp(adr_mode, "before")==0)
|
||||
*entity_code= 8;
|
||||
else if(strcmp(adr_mode, "after")==0)
|
||||
*entity_code= 9;
|
||||
else {
|
||||
sprintf(xorriso->info_text, "%s: unknown address mode '%s'", cmd, adr_mode);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
@@ -457,6 +467,42 @@ int Xorriso_decode_load_adr(struct XorrisO *xorriso, char *cmd,
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_prepare_load_search(struct XorrisO *xorriso, char *cmd,
|
||||
int adr_mode, char *adr_value_in,
|
||||
char *adr_value_out, int *params_flag,
|
||||
int flag)
|
||||
{
|
||||
int ret;
|
||||
time_t seconds;
|
||||
|
||||
*params_flag= 0;
|
||||
if(adr_mode == 4 && strlen(adr_value_in) <= 80) {
|
||||
ret= Xorriso__bourne_to_reg(adr_value_in, adr_value_out, 0);
|
||||
if(ret == 1) {
|
||||
*params_flag|= 4;
|
||||
} else {
|
||||
strcpy(adr_value_out, adr_value_in);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
if(adr_mode >= 5 && adr_mode <= 9) {
|
||||
ret= Decode_timestring(adr_value_in, &seconds, 0);
|
||||
if(ret <= 0) {
|
||||
sprintf(xorriso->info_text, "%s: Cannot decode timestring '%s'",
|
||||
cmd, adr_value_in);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
|
||||
return(0);
|
||||
}
|
||||
sprintf(adr_value_out, "%.f", (double) seconds);
|
||||
if(xorriso->toc_info_type == 3)
|
||||
*params_flag|= 4;
|
||||
return(1);
|
||||
}
|
||||
strcpy(adr_value_out, adr_value_in);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_check_thing_len(struct XorrisO *xorriso, char *name, int size,
|
||||
char *cmd, char *thing, int flag)
|
||||
@@ -1540,7 +1586,7 @@ next_command:;
|
||||
(*idx)+= 4;
|
||||
if((*idx)>argc) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-%s: Not enough arguments. Needed are: device entity id command",
|
||||
"-%s: Not enough arguments. Needed are: device entity id path",
|
||||
cmd);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0;
|
||||
@@ -1791,7 +1837,7 @@ next_command:;
|
||||
(*idx)+= 4;
|
||||
if((*idx)>argc) {
|
||||
sprintf(xorriso->info_text,
|
||||
"-%s: Not enough arguments. Needed are: device entity id command",
|
||||
"-%s: Not enough arguments. Needed are: device entity id format",
|
||||
cmd);
|
||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||
ret= 0;
|
||||
|
Reference in New Issue
Block a user