New API calls isoburn_igopt_get_effective_lba_v2(), isoburn_igopt_get_data_start_v2()

This commit is contained in:
Thomas Schmitt 2024-03-09 22:05:18 +01:00
parent e7326e0e6c
commit 423c14828c
4 changed files with 53 additions and 3 deletions

View File

@ -1502,20 +1502,57 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size)
}
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
off_t *lba)
{
*lba= o->effective_lba;
return(1);
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba)
{
int ret;
off_t long_lba;
ret= isoburn_igopt_get_effective_lba_v2(o, &long_lba);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
ret= 0;
} else {
*lba= long_lba;
}
return(ret);
}
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba)
{
*lba= o->data_start_lba;
return(1);
}
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba)
{
int ret;
off_t long_lba;
ret= isoburn_igopt_get_data_start_v2(o, &long_lba);
if(ret <= 0)
return(ret);
if(long_lba > 0x7fffffff) {
*lba= 0x7fffffff;
ret= 0;
} else {
*lba= long_lba;
}
return(ret);
}
int isoburn_igopt_set_scdbackup_tag(struct isoburn_imgen_opts *o, char *name,
char *timestamp, char *tag_written)
{

View File

@ -1575,6 +1575,12 @@ int isoburn_igopt_get_fifo_size(struct isoburn_imgen_opts *o, int *fifo_size);
*/
int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
/** Like isoburn_igopt_get_effective_lba(), but with off_t block addresses.
@since 1.5.8
*/
int isoburn_igopt_get_effective_lba_v2(struct isoburn_imgen_opts *o,
off_t *lba);
/** Obtain after image preparation the lowest block address of file content
data. Failure can occur if libisofs is too old to provide this information,
@ -1589,6 +1595,11 @@ int isoburn_igopt_get_effective_lba(struct isoburn_imgen_opts *o, int *lba);
*/
int isoburn_igopt_get_data_start(struct isoburn_imgen_opts *o, int *lba);
/** Like isoburn_igopt_get_data_start(), but with off_t block addresses.
@since 1.5.8
*/
int isoburn_igopt_get_data_start_v2(struct isoburn_imgen_opts *o, off_t *lba);
/** Set or get parameters "name" and "timestamp" for a scdbackup checksum
tag. It will be appended to the libisofs session tag if the image starts at

View File

@ -365,6 +365,8 @@ local: *;
LIBISOBURN1_1.5.8 {
isoburn_get_mount_params_v2;
isoburn_igopt_get_data_start_v2;
isoburn_igopt_get_effective_lba_v2;
isoburn_read_iso_head_v2;
isoburn_toc_disc_get_sectors_v2;
isoburn_toc_session_get_sectors_v2;

View File

@ -1 +1 @@
#define Xorriso_timestamP "2024.03.09.204838"
#define Xorriso_timestamP "2024.03.09.210426"