Commit 91955a71 authored by Thomas Schmitt's avatar Thomas Schmitt

Bug fix: -load volid did not perform pattern searc

parent 1a3297b6
#define Xorriso_timestamP "2009.05.06.173600"
#define Xorriso_timestamP "2009.05.06.174222"
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment