Add version field to all structs that will remain public.
This commit is contained in:
parent
764e99e34b
commit
1a1fcf8362
@ -247,6 +247,7 @@ libburn_data_source_new(struct burn_drive *d)
|
|||||||
IsoDataSource *ret;
|
IsoDataSource *ret;
|
||||||
|
|
||||||
ret = malloc(sizeof(IsoDataSource));
|
ret = malloc(sizeof(IsoDataSource));
|
||||||
|
ret->version = 0;
|
||||||
ret->refcount = 1;
|
ret->refcount = 1;
|
||||||
ret->read_block = libburn_ds_read_block;
|
ret->read_block = libburn_ds_read_block;
|
||||||
ret->open = libburn_ds_open;
|
ret->open = libburn_ds_open;
|
||||||
|
@ -182,6 +182,7 @@ int iso_data_source_new_from_file(const char *path, IsoDataSource **src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
data->fd = -1;
|
data->fd = -1;
|
||||||
|
ds->version = 0;
|
||||||
ds->refcount = 1;
|
ds->refcount = 1;
|
||||||
ds->data = data;
|
ds->data = data;
|
||||||
|
|
||||||
|
@ -683,6 +683,7 @@ void ifs_free(IsoFileSource *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IsoFileSourceIface ifs_class = {
|
IsoFileSourceIface ifs_class = {
|
||||||
|
0, /* version */
|
||||||
ifs_get_path,
|
ifs_get_path,
|
||||||
ifs_get_name,
|
ifs_get_name,
|
||||||
ifs_lstat,
|
ifs_lstat,
|
||||||
@ -1685,6 +1686,7 @@ int iso_image_filesystem_new(IsoDataSource *src, struct iso_read_opts *opts,
|
|||||||
strncpy(ifs->type, "iso ", 4);
|
strncpy(ifs->type, "iso ", 4);
|
||||||
ifs->data = data;
|
ifs->data = data;
|
||||||
ifs->refcount = 1;
|
ifs->refcount = 1;
|
||||||
|
ifs->version = 0;
|
||||||
ifs->get_root = ifs_get_root;
|
ifs->get_root = ifs_get_root;
|
||||||
ifs->get_by_path = ifs_get_by_path;
|
ifs->get_by_path = ifs_get_by_path;
|
||||||
ifs->get_id = ifs_get_id;
|
ifs->get_id = ifs_get_id;
|
||||||
|
@ -422,6 +422,7 @@ void lfs_free(IsoFileSource *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IsoFileSourceIface lfs_class = {
|
IsoFileSourceIface lfs_class = {
|
||||||
|
0, /* version */
|
||||||
lfs_get_path,
|
lfs_get_path,
|
||||||
lfs_get_name,
|
lfs_get_name,
|
||||||
lfs_lstat,
|
lfs_lstat,
|
||||||
@ -631,6 +632,7 @@ int iso_local_filesystem_new(IsoFilesystem **fs)
|
|||||||
/* fill struct */
|
/* fill struct */
|
||||||
strncpy(lfs->type, "file", 4);
|
strncpy(lfs->type, "file", 4);
|
||||||
lfs->refcount = 1;
|
lfs->refcount = 1;
|
||||||
|
lfs->version = 0;
|
||||||
lfs->data = NULL; /* we don't need private data */
|
lfs->data = NULL; /* we don't need private data */
|
||||||
lfs->get_root = lfs_get_root;
|
lfs->get_root = lfs_get_root;
|
||||||
lfs->get_by_path = lfs_get_by_path;
|
lfs->get_by_path = lfs_get_by_path;
|
||||||
|
@ -109,6 +109,9 @@ typedef struct iso_data_source IsoDataSource;
|
|||||||
* drive.
|
* drive.
|
||||||
*/
|
*/
|
||||||
struct iso_data_source {
|
struct iso_data_source {
|
||||||
|
|
||||||
|
/* reserved for future usage, set to 0 */
|
||||||
|
int version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reference count for the data source. Should be 1 when a new source
|
* Reference count for the data source. Should be 1 when a new source
|
||||||
@ -281,6 +284,9 @@ struct iso_filesystem
|
|||||||
*/
|
*/
|
||||||
char type[4];
|
char type[4];
|
||||||
|
|
||||||
|
/* reserved for future usage, set to 0 */
|
||||||
|
int version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the root of a filesystem.
|
* Get the root of a filesystem.
|
||||||
*
|
*
|
||||||
@ -358,6 +364,9 @@ struct iso_filesystem
|
|||||||
*/
|
*/
|
||||||
struct IsoFileSource_Iface
|
struct IsoFileSource_Iface
|
||||||
{
|
{
|
||||||
|
/* reserved for future usage, set to 0 */
|
||||||
|
int version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the path, relative to the filesystem this file source belongs to.
|
* Get the path, relative to the filesystem this file source belongs to.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user