Implement function to recursively add a dir to an iso tree.
This commit also to the following changes: - create_node() on builder never frees the IsoFileSource, it is responsability of the caller to free it. - Recursive addition options added to IsoImage (not exposed to public API yet) - create_node() takes care about follow_symlinks - Added little demo program to test it.
This commit is contained in:
10
src/image.c
10
src/image.c
@@ -77,6 +77,16 @@ int iso_image_new(const char *name, IsoImage **image)
|
||||
return res;
|
||||
}
|
||||
img->refcount = 1;
|
||||
img->recOpts = calloc(1,sizeof(IsoImageRecOpts));
|
||||
if (img->recOpts == NULL) {
|
||||
libiso_msgs_destroy(&img->messenger, 0);
|
||||
iso_node_builder_unref(img->builder);
|
||||
iso_filesystem_unref(img->fs);
|
||||
iso_node_unref((IsoNode*)img->root);
|
||||
free(img);
|
||||
return ISO_MEM_ERROR;
|
||||
}
|
||||
|
||||
if (name != NULL) {
|
||||
img->volset_id = strdup(name);
|
||||
img->volume_id = strdup(name);
|
||||
|
Reference in New Issue
Block a user