Made struct iso_hfsplus_xinfo_data clonable.
This commit is contained in:
parent
ed986aa4ea
commit
177864bd13
@ -215,6 +215,10 @@ LIBJTE_MISCONFIGURATION_ = 0;
|
||||
iso_px_ino_xinfo_cloner, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ret = iso_node_xinfo_make_clonable(iso_hfsplus_xinfo_func,
|
||||
iso_hfsplus_xinfo_cloner, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -2085,3 +2085,21 @@ struct iso_hfsplus_xinfo_data *iso_hfsplus_xinfo_new(int flag)
|
||||
return o;
|
||||
}
|
||||
|
||||
/* The iso_node_xinfo_cloner function which gets associated to
|
||||
* iso_hfsplus_xinfo_func by iso_init() resp. iso_init_with_flag() via
|
||||
* iso_node_xinfo_make_clonable()
|
||||
*/
|
||||
int iso_hfsplus_xinfo_cloner(void *old_data, void **new_data, int flag)
|
||||
{
|
||||
*new_data = NULL;
|
||||
if (flag)
|
||||
return ISO_XINFO_NO_CLONE;
|
||||
if (old_data == NULL)
|
||||
return 0;
|
||||
*new_data = iso_hfsplus_xinfo_new(0);
|
||||
if(*new_data == NULL)
|
||||
return ISO_OUT_OF_MEM;
|
||||
memcpy(*new_data, old_data, sizeof(struct iso_hfsplus_xinfo_data));
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -543,6 +543,12 @@ int checksum_md5_xinfo_func(void *data, int flag);
|
||||
*/
|
||||
int checksum_md5_xinfo_cloner(void *old_data, void **new_data, int flag);
|
||||
|
||||
/* The iso_node_xinfo_cloner function which gets associated to
|
||||
* iso_hfsplus_xinfo_func by iso_init() resp. iso_init_with_flag() via
|
||||
* iso_node_xinfo_make_clonable()
|
||||
*/
|
||||
int iso_hfsplus_xinfo_cloner(void *old_data, void **new_data, int flag);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user