Changed appearance of -show_stream, fixed bug introduced with rev 2575
This commit is contained in:
parent
fb25ceaeb0
commit
f116dc1abd
@ -2400,18 +2400,22 @@ composed from disk_path by replacing disk_prefix by iso_rr_prefix.
|
||||
\fB\-show_stream\fR iso_rr_path [***]
|
||||
Display the content stream chain of data files in the ISO image. The chain
|
||||
consists of the iso_rr_name and one or more streams, separated by " < " marks.
|
||||
A stream consists of one or more texts in ''-quotation marks, eventually
|
||||
separated by "." characters. The first text describes the stream type,
|
||||
the following ones describe its individual properties.
|
||||
A stream consists of one or more texts eventually in ''-quotation marks,
|
||||
eventually separated by ":" characters. The first text describes the stream
|
||||
type, the following ones describe its individual properties.
|
||||
Frequently used types are:
|
||||
.br
|
||||
'disk'.'disk_path' for local filesystem objects.
|
||||
disk:'disk_path' for local filesystem objects.
|
||||
.br
|
||||
'image'.'iso_rr_path' for ISO image file objects.
|
||||
image:'iso_rr_path' for ISO image file objects.
|
||||
.br
|
||||
'cout'.'disk_path offset count' for -cut_out files.
|
||||
cout:'disk_path offset count' for -cut_out files.
|
||||
.br
|
||||
'extf'.'filter_name' for external filters.
|
||||
extf:'filter_name' for external filters.
|
||||
.br
|
||||
Example:
|
||||
.br
|
||||
'/abc/xyz.gz' < extf:'gzip' < disk:'/home/me/x'
|
||||
.TP
|
||||
\fB\-show_stream_r\fR iso_rr_path [***]
|
||||
Like -show_stream but working recursively.
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2009.04.06.132007"
|
||||
#define Xorriso_timestamP "2009.04.06.143109"
|
||||
|
@ -9789,10 +9789,10 @@ int Xorriso_destroy_all_extf(struct XorrisO *xorriso, int flag)
|
||||
bit1= strip suffix rather than appending it
|
||||
*/
|
||||
int Xorriso_rename_suffix(struct XorrisO *xorriso, IsoNode *node, char *suffix,
|
||||
char *show_path, int flag)
|
||||
char *show_path, char new_name[], int flag)
|
||||
{
|
||||
int ret, lo= 0, ls= 0, strip_suffix;
|
||||
char *old_name= NULL, new_name[SfileadrL], *show_name;
|
||||
char *old_name= NULL, *show_name;
|
||||
|
||||
strip_suffix= !!(flag & 2);
|
||||
|
||||
@ -9882,6 +9882,7 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
|
||||
|
||||
#ifndef NIX
|
||||
IsoStream *stream;
|
||||
int is_renamed= 0;
|
||||
#else
|
||||
int lo= 0, ls= 0;
|
||||
#endif
|
||||
@ -9932,10 +9933,12 @@ int Xorriso_set_filter(struct XorrisO *xorriso, void *in_node,
|
||||
|
||||
/* >>> would need full iso_rr_path of node for showing */;
|
||||
|
||||
ret= Xorriso_rename_suffix(xorriso, node, suffix, path,
|
||||
old_name= strdup((char *) iso_node_get_name(node));
|
||||
ret= Xorriso_rename_suffix(xorriso, node, suffix, path, new_name,
|
||||
(flag & 1) | (strip_suffix ? 2 : 0));
|
||||
if(ret <= 0 || ret == 2)
|
||||
goto ex;
|
||||
is_renamed= 1;
|
||||
|
||||
#else /* ! NIX */
|
||||
|
||||
@ -10015,6 +10018,7 @@ cannot_append_suffix:;
|
||||
/* >>> would need the current renaming state of path */;
|
||||
|
||||
ret= Xorriso_rename_suffix(xorriso, node, cmd->suffix, NULL,
|
||||
new_name,
|
||||
(flag & 1) | (!(cmd->behavior & 8) << 1));
|
||||
if(ret <= 0 || ret == 2)
|
||||
goto ex;
|
||||
@ -10283,10 +10287,33 @@ int Xorriso_status_extf(struct XorrisO *xorriso, char *filter, FILE *fp,
|
||||
}
|
||||
|
||||
|
||||
int Xorriso_stream_type(struct XorrisO *xorriso, IsoNode *node,
|
||||
IsoStream *stream, char type_text[], int flag)
|
||||
{
|
||||
int ret, lba;
|
||||
char text[5];
|
||||
|
||||
strncpy(text, stream->class->type, 4);
|
||||
text[4]= 0;
|
||||
if(strcmp(text, "fsrc") == 0) {
|
||||
ret= Xorriso__file_start_lba(node, &lba, 0);
|
||||
if(ret > 0 && lba > 0)
|
||||
strcpy(type_text, "image");
|
||||
else
|
||||
strcpy(type_text, "disk");
|
||||
} else if(strcmp(text, "cout") == 0 || strcmp(text, "boot") == 0 ||
|
||||
strcmp(text, "user") == 0 || strcmp(text, "extf") == 0) {
|
||||
strcpy(type_text, text);
|
||||
} else {
|
||||
Text_shellsafe(text, type_text, 0);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node,
|
||||
char *path, int flag)
|
||||
{
|
||||
int ret, lba;
|
||||
int ret;
|
||||
IsoNode *node;
|
||||
IsoFile *file;
|
||||
IsoStream *stream= NULL, *input_stream;
|
||||
@ -10309,6 +10336,9 @@ int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node,
|
||||
input_stream= iso_stream_get_input_stream(stream, 0);
|
||||
if(input_stream == NULL)
|
||||
break;
|
||||
strcat(xorriso->result_line, " < ");
|
||||
Xorriso_stream_type(xorriso, node, stream, type_text, 0);
|
||||
strcat(xorriso->result_line, type_text);
|
||||
ret= iso_stream_get_external_filter(stream, &cmd, 0);
|
||||
if(ret < 0) {
|
||||
Xorriso_process_msg_queues(xorriso,0);
|
||||
@ -10316,12 +10346,8 @@ int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node,
|
||||
"Error when inquiring filter command of node", 0, "FAILURE", 1);
|
||||
ret= 0; goto ex;
|
||||
}
|
||||
strcat(xorriso->result_line, " < ");
|
||||
strncpy(type_text, stream->class->type, 4);
|
||||
type_text[4]= 0;
|
||||
Text_shellsafe(type_text, xorriso->result_line, 1);
|
||||
if(ret > 0) {
|
||||
strcat(xorriso->result_line, ".");
|
||||
strcat(xorriso->result_line, ":");
|
||||
Text_shellsafe(cmd->name, xorriso->result_line, 1);
|
||||
}
|
||||
if(strlen(xorriso->result_line) > SfileadrL) {
|
||||
@ -10330,20 +10356,12 @@ int Xorriso_show_stream(struct XorrisO *xorriso, void *in_node,
|
||||
}
|
||||
}
|
||||
strcat(xorriso->result_line, " < ");
|
||||
strncpy(type_text, stream->class->type, 4);
|
||||
type_text[4]= 0;
|
||||
if(strcmp(type_text, "fsrc") == 0) {
|
||||
ret= Xorriso__file_start_lba(node, &lba, 0);
|
||||
if(ret > 0 && lba > 0)
|
||||
strcpy(type_text, "image");
|
||||
else
|
||||
strcpy(type_text, "disk");
|
||||
}
|
||||
Text_shellsafe(type_text, xorriso->result_line, 1);
|
||||
Xorriso_stream_type(xorriso, node, stream, type_text, 0);
|
||||
strcat(xorriso->result_line, type_text);
|
||||
|
||||
source_path= iso_stream_get_source_path(stream, 0);
|
||||
if(source_path != NULL) {
|
||||
strcat(xorriso->result_line, ".");
|
||||
strcat(xorriso->result_line, ":");
|
||||
Text_shellsafe(source_path, xorriso->result_line, 1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user