Handled -list_format with non MMC drives

This commit is contained in:
Thomas Schmitt 2008-05-13 18:06:04 +00:00
parent 0adc5cf1dc
commit be78c03e66
2 changed files with 11 additions and 3 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.05.13.153837"
#define Xorriso_timestamP "2008.05.13.180624"

View File

@ -2918,12 +2918,20 @@ int Xorriso_list_formats(struct XorrisO *xorriso, int flag)
if(ret<=0)
return(0);
ret= burn_drive_get_drive_role(drive);
if(ret!=1) {
sprintf(xorriso->info_text,
"output device is not an MMC drive. -list_format does not apply");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0);
ret= 2; goto ex;
}
ret = burn_disc_get_formats(drive, &status, &size, &dummy,
&num_formats);
if(ret <= 0) {
if(ret<=0) {
sprintf(xorriso->info_text, "Cannot obtain format list info");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
ret= 2; goto ex;
ret= 0; goto ex;
}
ret= Xorriso_toc(xorriso, 3);
if(ret<=0)