"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xorriso/iso_tree.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.

iso_tree.c  (xorriso-1.5.2):iso_tree.c  (xorriso-1.5.4)
skipping to change at line 301 skipping to change at line 301
stbuf->st_rdev= dev_number; stbuf->st_rdev= dev_number;
} else if(LIBISO_ISFIFO(*node)) } else if(LIBISO_ISFIFO(*node))
stbuf->st_mode|= S_IFIFO; stbuf->st_mode|= S_IFIFO;
else if(LIBISO_ISSOCK(*node)) else if(LIBISO_ISSOCK(*node))
stbuf->st_mode|= S_IFSOCK; stbuf->st_mode|= S_IFSOCK;
else if(LIBISO_ISBOOT(*node)) else if(LIBISO_ISBOOT(*node))
stbuf->st_mode|= Xorriso_IFBOOT; stbuf->st_mode|= Xorriso_IFBOOT;
/* >>> With directories this should be : number of subdirs + 2 */ /* >>> With directories this should be : number of subdirs + 2 */
/* >>> ??? How to obtain RR hardlink number for other types ? */ /* >>> ??? How to obtain RR hardlink number for other types ? */
/* This may get overriden farther down */ /* This may get overridden farther down */
stbuf->st_nlink= 1; stbuf->st_nlink= 1;
stbuf->st_uid= iso_node_get_uid(*node); stbuf->st_uid= iso_node_get_uid(*node);
stbuf->st_gid= iso_node_get_gid(*node); stbuf->st_gid= iso_node_get_gid(*node);
if(LIBISO_ISREG(*node)) if(LIBISO_ISREG(*node))
stbuf->st_size= iso_file_get_size((IsoFile *) *node)+ (2048 * !!(flag&2)); stbuf->st_size= iso_file_get_size((IsoFile *) *node)+ (2048 * !!(flag&2));
else if(LIBISO_ISBOOT(*node)) { else if(LIBISO_ISBOOT(*node)) {
ret= Xorriso_get_volume(xorriso, &volume, 0); ret= Xorriso_get_volume(xorriso, &volume, 0);
if(ret <= 0) if(ret <= 0)
skipping to change at line 1280 skipping to change at line 1280
ret= 0; ret= 0;
ex: ex:
Xorriso_get_attrs(xorriso, in_node, path, &num_attrs, &names, Xorriso_get_attrs(xorriso, in_node, path, &num_attrs, &names,
&value_lengths, &values, 1 << 15); &value_lengths, &values, 1 << 15);
return(ret); return(ret);
} }
int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node, int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node,
IsoStream *stream, char type_text[], int flag) IsoStream *stream, char type_text[], int flag)
{ {
int ret, lba; int ret, lba, stream_type, block_size_log2;
uint8_t zisofs_algo[2], algo_num;
char text[5]; char text[5];
strncpy(text, stream->class->type, 4); strncpy(text, stream->class->type, 4);
text[4]= 0; text[4]= 0;
if(strcmp(text, "fsrc") == 0) { if(strcmp(text, "fsrc") == 0) {
ret= Xorriso__file_start_lba(node, &lba, 0); ret= Xorriso__file_start_lba(node, &lba, 0);
if(ret > 0 && lba > 0) if(ret > 0 && lba > 0)
strcpy(type_text, "image"); strcpy(type_text, "image");
else else
strcpy(type_text, "disk"); strcpy(type_text, "disk");
} else if(strcmp(text, "ziso") == 0) { } else if(strcmp(text, "ziso") == 0 || strcmp(text, "osiz") == 0) {
strcpy(type_text, "--zisofs"); if(strcmp(text, "ziso") == 0)
} else if(strcmp(text, "osiz") == 0) { strcpy(type_text, "--zisofs");
strcpy(type_text, "--zisofs-decode"); else
strcpy(type_text, "--zisofs-decode");
ret= iso_stream_get_zisofs_par(stream, &stream_type, zisofs_algo, &algo_num,
&block_size_log2, 0);
if(ret == 1)
sprintf(type_text + strlen(type_text), ":%c%c:%dk",
zisofs_algo[0], zisofs_algo[1], 1 << (block_size_log2 - 10));
} else if(strcmp(text, "gzip") == 0) { } else if(strcmp(text, "gzip") == 0) {
strcpy(type_text, "--gzip"); strcpy(type_text, "--gzip");
} else if(strcmp(text, "pizg") == 0) { } else if(strcmp(text, "pizg") == 0) {
strcpy(type_text, "--gunzip"); strcpy(type_text, "--gunzip");
} else if(strcmp(text, "cout") == 0 || strcmp(text, "boot") == 0 || } else if(strcmp(text, "cout") == 0 || strcmp(text, "boot") == 0 ||
strcmp(text, "user") == 0 || strcmp(text, "extf") == 0) { strcmp(text, "user") == 0 || strcmp(text, "extf") == 0) {
strcpy(type_text, text); strcpy(type_text, text);
} else { } else {
Text_shellsafe(text, type_text, 0); Text_shellsafe(text, type_text, 0);
} }
skipping to change at line 2051 skipping to change at line 2058
free(adr); free(adr);
if(flag&2) if(flag&2)
(*dive_count)--; (*dive_count)--;
if(iter != NULL) if(iter != NULL)
iso_dir_iter_free(iter); iso_dir_iter_free(iter);
return(ret); return(ret);
} }
/* @param flag bit0= a match count !=1 is a FAILURE event /* @param flag bit0= a match count !=1 is a FAILURE event
bit1= with bit0 tolerate 0 matches if pattern is a constant bit1= with bit0 tolerate 0 matches if pattern is a constant
bit2= do not issue debug messages about temporay memory needs bit2= do not issue debug messages about temporary memory needs
bit3= do not add unresolved pattern to filev bit3= do not add unresolved pattern to filev
*/ */
int Xorriso_expand_pattern(struct XorrisO *xorriso, int Xorriso_expand_pattern(struct XorrisO *xorriso,
int num_patterns, char **patterns, int extra_filec, int num_patterns, char **patterns, int extra_filec,
int *filec, char ***filev, off_t *mem, int flag) int *filec, char ***filev, off_t *mem, int flag)
{ {
int ret, count= 0, abs_adr= 0, i, was_count, was_filec; int ret, count= 0, abs_adr= 0, i, was_count, was_filec;
int nonconst_mismatches= 0, dive_count= 0; int nonconst_mismatches= 0, dive_count= 0;
IsoImage *volume; IsoImage *volume;
IsoDir *dir= NULL, *root_dir; IsoDir *dir= NULL, *root_dir;
skipping to change at line 2360 skipping to change at line 2367
/* @param flag bit0= show numbers from iso_stream_get_id /* @param flag bit0= show numbers from iso_stream_get_id
*/ */
int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node, int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node,
char *path, int flag) char *path, int flag)
{ {
int ret; int ret;
IsoNode *node; IsoNode *node;
IsoFile *file; IsoFile *file;
IsoStream *stream= NULL, *input_stream; IsoStream *stream= NULL, *input_stream;
IsoExternalFilterCommand *cmd; IsoExternalFilterCommand *cmd;
char type_text[16], *source_path= NULL; char type_text[80], *source_path= NULL;
unsigned int fs_id; unsigned int fs_id;
dev_t dev_id; dev_t dev_id;
ino_t ino_id; ino_t ino_id;
node= (IsoNode *) in_node; node= (IsoNode *) in_node;
if(node == NULL) { if(node == NULL) {
ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0); ret= Xorriso_get_node_by_path(xorriso, path, NULL, &node, 0);
if(ret <= 0) if(ret <= 0)
goto ex; goto ex;
} }
 End of changes. 5 change blocks. 
8 lines changed or deleted 15 lines changed or added

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