New command -toc_info_type

This commit is contained in:
2024-06-28 16:42:28 +02:00
parent 2306175432
commit 7f1abc4174
14 changed files with 304 additions and 89 deletions

View File

@ -1691,6 +1691,32 @@ int Xorriso_option_toc(struct XorrisO *xorriso, int flag)
}
/* Command -toc_info_type */
int Xorriso_option_toc_info_type(struct XorrisO *xorriso, char *mode, int flag)
{
if(strcmp(mode, "volid") == 0 || mode[0] == 0) {
xorriso->toc_info_type= 1;
} else if(strcmp(mode, "creation_time") == 0 ||
strcmp(mode, "ctime") == 0 ||
strcmp(mode, "creation_time_gmt") == 0 ||
strcmp(mode, "ctime_gmt") == 0) {
xorriso->toc_info_type= 3;
xorriso->toc_time_form= (strstr(mode, "_gmt") == NULL);
} else if(strcmp(mode, "modification_time") == 0 ||
strcmp(mode, "mtime") == 0 ||
strcmp(mode, "modification_time_gmt") == 0 ||
strcmp(mode, "mtime_gmt") == 0) {
xorriso->toc_info_type= 4;
xorriso->toc_time_form= (strstr(mode, "_gmt") == NULL);
} else {
sprintf(xorriso->info_text, "-toc_info_type: unknown type '%s'", mode);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
return(0);
}
return(1);
}
/* Option -toc_of */
int Xorriso_option_toc_of(struct XorrisO *xorriso, char *which, int flag)
{