Improved effective drive address with -as mkisofs -M
This commit is contained in:
parent
3cd9763879
commit
1e95e13263
@ -7537,11 +7537,9 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
|
||||
goto not_enough_args;
|
||||
i++;
|
||||
indev[0]= 0;
|
||||
|
||||
/* >>> MULTI :
|
||||
check whether indev is a valid MMC drive. Else : */
|
||||
ret= Xorriso_libburn_adr(xorriso, argv[i], sfe, 0);
|
||||
if(ret<=0)
|
||||
strcpy(indev, "stdio:");
|
||||
|
||||
if(Sfile_str(indev+strlen(indev), argv[i], 0)<=0)
|
||||
{ret= -1; goto ex;}
|
||||
} else if(strcmp(argv[i], "-C")==0 ||
|
||||
@ -12167,7 +12165,7 @@ return:
|
||||
*/
|
||||
{
|
||||
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)
|
||||
return(0);
|
||||
@ -12638,13 +12636,17 @@ next_command:;
|
||||
ret= Xorriso_option_temp_mem_limit(xorriso, arg1, 0);
|
||||
|
||||
} else if(strcmp(cmd,"test")==0) { /* This option does not exist. */
|
||||
(*idx)+= 2;
|
||||
ret= Xorriso_restore_is_identical(xorriso, NULL, arg2, arg1, type_text, 2);
|
||||
if(ret>=0) {
|
||||
sprintf(xorriso->info_text, "ISO node and disk file are %s\n",
|
||||
ret>0 ? ret==2 ? "suspicious" : "identical" : "different");
|
||||
char buf[SfileadrL];
|
||||
|
||||
(*idx)+= 1;
|
||||
ret= Xorriso_libburn_adr(xorriso, arg1, buf, 0);
|
||||
if(ret>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) {
|
||||
Xorriso_option_toc(xorriso, 0);
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2008.07.05.184434"
|
||||
#define Xorriso_timestamP "2008.07.06.110336"
|
||||
|
@ -6352,3 +6352,20 @@ int Xorriso_is_split(struct XorrisO *xorriso, char *path, void *node,
|
||||
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);
|
||||
}
|
||||
|
@ -259,5 +259,15 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
|
||||
char *img_path, char *disk_path,
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user