Made Xorriso_aquire_drive() ready for long block adresses
This commit is contained in:
parent
d24634af3d
commit
82deb547c0
@ -349,7 +349,8 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
int flag)
|
int flag)
|
||||||
{
|
{
|
||||||
int ret, hret, not_writeable= 0, has_what, aquire_flag;
|
int ret, hret, not_writeable= 0, has_what, aquire_flag;
|
||||||
int lba, track, session, params_flag, adr_mode, read_ret, start_lba;
|
int track, session, params_flag, adr_mode, read_ret;
|
||||||
|
off_t lba, start_lba;
|
||||||
int truncate_mode;
|
int truncate_mode;
|
||||||
uint32_t size, offst;
|
uint32_t size, offst;
|
||||||
struct burn_drive_info *dinfo= NULL, *out_dinfo= NULL, *in_dinfo= NULL;
|
struct burn_drive_info *dinfo= NULL, *out_dinfo= NULL, *in_dinfo= NULL;
|
||||||
@ -528,7 +529,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
ret= Xorriso__bourne_to_reg(xorriso->image_start_value, adr_data, 0);
|
ret= Xorriso__bourne_to_reg(xorriso->image_start_value, adr_data, 0);
|
||||||
if(ret == 1)
|
if(ret == 1)
|
||||||
params_flag|= 4;
|
params_flag|= 4;
|
||||||
ret= isoburn_get_mount_params(drive, 4, adr_data, &lba, &track,
|
ret= isoburn_get_mount_params_v2(drive, 4, adr_data, &lba, &track,
|
||||||
&session, volid, params_flag);
|
&session, volid, params_flag);
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
if(ret <= 0)
|
if(ret <= 0)
|
||||||
@ -539,7 +540,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
0, "FAILURE", 0);
|
0, "FAILURE", 0);
|
||||||
ret= 0; goto ex;
|
ret= 0; goto ex;
|
||||||
}
|
}
|
||||||
sprintf(volid, "%d", lba);
|
sprintf(volid, "%.f", (double) lba);
|
||||||
adr_pt= volid;
|
adr_pt= volid;
|
||||||
adr_mode= 3;
|
adr_mode= 3;
|
||||||
}
|
}
|
||||||
@ -593,7 +594,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
|
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
|
||||||
"on attempt to attach ISO image object to outdev", 16);
|
"on attempt to attach ISO image object to outdev", 16);
|
||||||
if(ret > 0)
|
if(ret > 0)
|
||||||
start_lba= isoburn_get_attached_start_lba(in_drive);
|
start_lba= isoburn_get_attached_start_lba_v2(in_drive);
|
||||||
ret= isoburn_attach_image(drive, (IsoImage *) xorriso->in_volset_handle);
|
ret= isoburn_attach_image(drive, (IsoImage *) xorriso->in_volset_handle);
|
||||||
if(ret<=0) {
|
if(ret<=0) {
|
||||||
sprintf(xorriso->info_text,
|
sprintf(xorriso->info_text,
|
||||||
@ -602,7 +603,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
{ret= -1; goto ex;}
|
{ret= -1; goto ex;}
|
||||||
}
|
}
|
||||||
if(start_lba >= 0)
|
if(start_lba >= 0)
|
||||||
isoburn_attach_start_lba(drive, start_lba, 0);
|
isoburn_attach_start_lba_v2(drive, start_lba, 0);
|
||||||
}
|
}
|
||||||
if(!(flag&32))
|
if(!(flag&32))
|
||||||
Xorriso_toc(xorriso, 1 | 2 | 8);
|
Xorriso_toc(xorriso, 1 | 2 | 8);
|
||||||
@ -704,7 +705,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
|
ret= Xorriso_get_drive_handles(xorriso, &in_dinfo, &in_drive,
|
||||||
"on attempt to attach ISO image volset to outdev", 16);
|
"on attempt to attach ISO image volset to outdev", 16);
|
||||||
if(ret > 0)
|
if(ret > 0)
|
||||||
start_lba= isoburn_get_attached_start_lba(in_drive);
|
start_lba= isoburn_get_attached_start_lba_v2(in_drive);
|
||||||
ret= Xorriso_get_drive_handles(xorriso, &out_dinfo, &out_drive,
|
ret= Xorriso_get_drive_handles(xorriso, &out_dinfo, &out_drive,
|
||||||
"on attempt to attach ISO image volset to outdev", 2);
|
"on attempt to attach ISO image volset to outdev", 2);
|
||||||
if(ret<=0)
|
if(ret<=0)
|
||||||
@ -712,7 +713,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr,
|
|||||||
iso_image_ref((IsoImage *) xorriso->in_volset_handle);
|
iso_image_ref((IsoImage *) xorriso->in_volset_handle);
|
||||||
isoburn_attach_image(out_drive, xorriso->in_volset_handle);
|
isoburn_attach_image(out_drive, xorriso->in_volset_handle);
|
||||||
if(start_lba >= 0)
|
if(start_lba >= 0)
|
||||||
isoburn_attach_start_lba(out_drive, start_lba, 0);
|
isoburn_attach_start_lba_v2(out_drive, start_lba, 0);
|
||||||
}
|
}
|
||||||
Xorriso_process_msg_queues(xorriso,0);
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
isoburn_ropt_get_size_what(ropts, &size, &has_what);
|
isoburn_ropt_get_size_what(ropts, &size, &has_what);
|
||||||
|
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2024.03.19.090146"
|
#define Xorriso_timestamP "2024.03.19.112303"
|
||||||
|
Loading…
Reference in New Issue
Block a user