Improved effective drive address with -as mkisofs -M

This commit is contained in:
Thomas Schmitt 2008-07-06 11:03:02 +00:00
parent 7929742207
commit 821b5c23fe
4 changed files with 42 additions and 13 deletions

View File

@ -7537,11 +7537,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
goto not_enough_args; goto not_enough_args;
i++; i++;
indev[0]= 0; indev[0]= 0;
ret= Xorriso_libburn_adr(xorriso, argv[i], sfe, 0);
/* >>> MULTI : if(ret<=0)
check whether indev is a valid MMC drive. Else : */
strcpy(indev, "stdio:"); strcpy(indev, "stdio:");
if(Sfile_str(indev+strlen(indev), argv[i], 0)<=0) if(Sfile_str(indev+strlen(indev), argv[i], 0)<=0)
{ret= -1; goto ex;} {ret= -1; goto ex;}
} else if(strcmp(argv[i], "-C")==0 || } else if(strcmp(argv[i], "-C")==0 ||
@ -12167,7 +12165,7 @@ return:
*/ */
{ {
int ret, was_dashed, end_ret, num1, num2; int ret, was_dashed, end_ret, num1, num2;
char *cmd, *original_cmd, cmd_data[2*SfileadrL], *arg1, *arg2, type_text[5]; char *cmd, *original_cmd, cmd_data[2*SfileadrL], *arg1, *arg2;
if(xorriso==NULL) if(xorriso==NULL)
return(0); return(0);
@ -12638,13 +12636,17 @@ next_command:;
ret= Xorriso_option_temp_mem_limit(xorriso, arg1, 0); ret= Xorriso_option_temp_mem_limit(xorriso, arg1, 0);
} else if(strcmp(cmd,"test")==0) { /* This option does not exist. */ } else if(strcmp(cmd,"test")==0) { /* This option does not exist. */
(*idx)+= 2; char buf[SfileadrL];
ret= Xorriso_restore_is_identical(xorriso, NULL, arg2, arg1, type_text, 2);
if(ret>=0) { (*idx)+= 1;
sprintf(xorriso->info_text, "ISO node and disk file are %s\n", ret= Xorriso_libburn_adr(xorriso, arg1, buf, 0);
ret>0 ? ret==2 ? "suspicious" : "identical" : "different"); if(ret>0)
Xorriso_info(xorriso, 0); sprintf(xorriso->info_text, " %s -> %s\n", arg1, buf);
} else if(ret==0)
sprintf(xorriso->info_text, " not a libburn drive: %s\n", arg1);
else
sprintf(xorriso->info_text, " severe error with: %s\n", arg1);
Xorriso_info(xorriso, 0);
} else if(strcmp(cmd,"toc")==0) { } else if(strcmp(cmd,"toc")==0) {
Xorriso_option_toc(xorriso, 0); Xorriso_option_toc(xorriso, 0);

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.07.05.184434" #define Xorriso_timestamP "2008.07.06.110336"

View File

@ -6352,3 +6352,20 @@ int Xorriso_is_split(struct XorrisO *xorriso, char *path, void *node,
return(ret>0); return(ret>0);
} }
int Xorriso_libburn_adr(struct XorrisO *xorriso, char *path, char adr[],
int flag)
{
int ret;
char local_adr[BURN_DRIVE_ADR_LEN];
adr[0]= 0;
ret= burn_drive_convert_fs_adr(path, local_adr);
Xorriso_process_msg_queues(xorriso,0);
if(ret<=0)
return(ret);
if(strlen(local_adr)>=SfileadrL)
return(2);
strcpy(adr, local_adr);
return(1);
}

View File

@ -259,5 +259,15 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
char *img_path, char *disk_path, char *img_path, char *disk_path,
char type_text[5], int flag); char type_text[5], int flag);
/* Return the official libburn address of an address string. This may fail
if the string does not constitute a valid drive address.
@param official_adr must offer SfileadrL bytes of reply buffer
@return 1 = success , 0 = failure , -1 = severe error
*/
int Xorriso_libburn_adr(struct XorrisO *xorriso, char *address_string,
char official_adr[], int flag);
#endif /* Xorrisoburn_includeD */ #endif /* Xorrisoburn_includeD */