"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libisofs/fs_local.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

fs_local.c  (xorriso-1.5.2):fs_local.c  (xorriso-1.5.4)
skipping to change at line 53 skipping to change at line 53
* We can share a local filesystem object, as it has no private atts. * We can share a local filesystem object, as it has no private atts.
*/ */
IsoFilesystem *lfs= NULL; IsoFilesystem *lfs= NULL;
/* IMPORTANT: Any change must be reflected by lfs_clone_src() */ /* IMPORTANT: Any change must be reflected by lfs_clone_src() */
typedef struct typedef struct
{ {
/** reference to the parent (if root it points to itself) */ /** reference to the parent (if root it points to itself) */
IsoFileSource *parent; IsoFileSource *parent;
char *name; char *name;
unsigned int openned :2; /* 0: not openned, 1: file, 2:dir */ unsigned int openned :2; /* 0: not opened, 1: file, 2:dir */
union union
{ {
int fd; int fd;
DIR *dir; DIR *dir;
} info; } info;
} _LocalFsFileSource; } _LocalFsFileSource;
static static
char* lfs_get_path(IsoFileSource *src) char* lfs_get_path(IsoFileSource *src)
{ {
skipping to change at line 486 skipping to change at line 486
return src == NULL ? NULL : lfs; return src == NULL ? NULL : lfs;
} }
static static
void lfs_free(IsoFileSource *src) void lfs_free(IsoFileSource *src)
{ {
_LocalFsFileSource *data; _LocalFsFileSource *data;
data = src->data; data = src->data;
/* close the file if it is already openned */ /* close the file if it is already opened */
if (data->openned) { if (data->openned) {
src->class->close(src); src->class->close(src);
} }
if (data->parent != src) { if (data->parent != src) {
iso_file_source_unref(data->parent); iso_file_source_unref(data->parent);
} }
free(data->name); free(data->name);
free(data); free(data);
iso_filesystem_unref(lfs); iso_filesystem_unref(lfs);
} }
skipping to change at line 815 skipping to change at line 815
/* just take a new ref */ /* just take a new ref */
iso_filesystem_ref(lfs); iso_filesystem_ref(lfs);
} else { } else {
lfs = malloc(sizeof(IsoFilesystem)); lfs = malloc(sizeof(IsoFilesystem));
if (lfs == NULL) { if (lfs == NULL) {
return ISO_OUT_OF_MEM; return ISO_OUT_OF_MEM;
} }
/* fill struct */ /* fill struct */
strncpy(lfs->type, "file", 4); memcpy(lfs->type, "file", 4);
lfs->refcount = 1; lfs->refcount = 1;
lfs->version = 0; 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;
lfs->get_id = lfs_get_id; lfs->get_id = lfs_get_id;
lfs->open = lfs_fs_open; lfs->open = lfs_fs_open;
lfs->close = lfs_fs_close; lfs->close = lfs_fs_close;
lfs->free = lfs_fs_free; lfs->free = lfs_fs_free;
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)