Bug fix: -load volid did not perform pattern searc

This commit is contained in:
Thomas Schmitt 2009-05-06 17:43:30 +00:00
parent 495fb8dee0
commit b1912f8f39
2 changed files with 27 additions and 3 deletions

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.05.06.173600"
#define Xorriso_timestamP "2009.05.06.174222"

View File

@ -539,6 +539,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
size_t value_length;
char *value= NULL;
double num;
int lba, track, session, params_flag, adr_mode;
char volid[33], adr_data[163], *adr_pt;
static int no_rr_or_joliet= 0;
@ -608,8 +610,30 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, int flag)
if(xorriso->image_start_mode&(1<<31)) /* used up setting */
xorriso->image_start_mode&= ~0xffff; /* perform auto setting */
if((xorriso->image_start_mode&(1<<30))) { /* if enabled at all */
ret= isoburn_set_msc1(drive, xorriso->image_start_mode & 0xffff,
xorriso->image_start_value,
adr_pt= xorriso->image_start_value;
adr_mode= xorriso->image_start_mode & 0xffff;
if(adr_mode == 4 && strlen(adr_pt) <= 80) {
/* Convert volid search expression into lba */
params_flag= 0;
ret= Xorriso__bourne_to_reg(xorriso->image_start_value, adr_data, 0);
if(ret == 1)
params_flag|= 4;
ret= isoburn_get_mount_params(drive, 4, adr_data, &lba, &track,
&session, volid, params_flag);
Xorriso_process_msg_queues(xorriso,0);
if(ret <= 0)
goto ex;
if(session <= 0 || track <= 0 || ret == 2) {
Xorriso_msgs_submit(xorriso, 0,
"-load : Given address does not point to an ISO 9660 session",
0, "FAILURE", 0);
ret= 0; goto ex;
}
sprintf(volid, "%d", lba);
adr_pt= volid;
adr_mode= 3;
}
ret= isoburn_set_msc1(drive, adr_mode, adr_pt,
!!(xorriso->image_start_mode & (1<<16)));
if(ret<=0)
goto ex;