New API calls isoburn_ropt_set_truncate_mode() isoburn_ropt_get_truncate_mode()
This commit is contained in:
@@ -855,6 +855,8 @@ int isoburn_ropt_new(struct isoburn_read_opts **new_o, int flag)
|
||||
o->mode= 0444;
|
||||
o->dirmode= 0555;
|
||||
o->input_charset= NULL;
|
||||
o->truncate_mode= 1;
|
||||
o->truncate_length= 255;
|
||||
o->hasRR= 0;
|
||||
o->hasJoliet= 0;
|
||||
o->hasIso1999= 0;
|
||||
@@ -1053,6 +1055,30 @@ int isoburn_ropt_get_displacement(struct isoburn_read_opts *o,
|
||||
}
|
||||
|
||||
|
||||
int isoburn_ropt_set_truncate_mode(struct isoburn_read_opts *o,
|
||||
int mode, int length)
|
||||
{
|
||||
if(mode < 0 || mode > 1)
|
||||
mode= 1;
|
||||
if(length < 64)
|
||||
length= 64;
|
||||
if(length > 255)
|
||||
length= 255;
|
||||
o->truncate_mode= mode;
|
||||
o->truncate_length= length;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_ropt_get_truncate_mode(struct isoburn_read_opts *o,
|
||||
int *mode, int *length)
|
||||
{
|
||||
*mode= o->truncate_mode;
|
||||
*length= o->truncate_length;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int isoburn_ropt_get_size_what(struct isoburn_read_opts *o,
|
||||
uint32_t *size, int *has_what)
|
||||
{
|
||||
|
Reference in New Issue
Block a user