Adapted to iso_tree_add_new_node()
This commit is contained in:
parent
66bf6a9148
commit
62f389c5ea
@ -1 +1 @@
|
|||||||
#define Xorriso_timestamP "2008.03.07.220442"
|
#define Xorriso_timestamP "2008.03.08.104231"
|
||||||
|
@ -1433,13 +1433,17 @@ int Xorriso_transfer_properties(struct XorrisO *xorriso, struct stat *stbuf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Ticket 132 : Workaround for missing feature */
|
/* Ticket 132 : Workaround for missing feature iso_tree_add_new_node() */
|
||||||
int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
|
int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
|
||||||
IsoDir *dir, char *disk_path, char *img_name,
|
IsoDir *dir, char *disk_path, char *img_name,
|
||||||
char *nominal_source, char *nominal_target,
|
char *nominal_source, char *nominal_target,
|
||||||
IsoNode **node, int flag)
|
IsoNode **node, int flag)
|
||||||
{
|
{
|
||||||
int ret, wa_ret, i;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef Xorriso_workaround_ticket_132
|
||||||
|
|
||||||
|
int wa_ret, i;
|
||||||
char wa_name[256];
|
char wa_name[256];
|
||||||
IsoDir *hdir;
|
IsoDir *hdir;
|
||||||
|
|
||||||
@ -1466,8 +1470,20 @@ int Xorriso_tree_graft_node(struct XorrisO *xorriso, IsoImage *volume,
|
|||||||
}
|
}
|
||||||
iso_node_remove((IsoNode *) hdir);
|
iso_node_remove((IsoNode *) hdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* Xorriso_workaround_ticket_132 */
|
||||||
|
|
||||||
|
ret= iso_tree_add_new_node(volume, dir, img_name, disk_path, node);
|
||||||
|
|
||||||
|
#endif /* Xorriso_workaround_ticket_132 */
|
||||||
|
|
||||||
if(ret<0) {
|
if(ret<0) {
|
||||||
|
|
||||||
|
#ifdef Xorriso_workaround_ticket_132
|
||||||
cannot_add:;
|
cannot_add:;
|
||||||
|
#endif /* Xorriso_workaround_ticket_132 */
|
||||||
|
|
||||||
|
Xorriso_process_msg_queues(xorriso,0);
|
||||||
Xorriso_report_iso_error(xorriso, nominal_source, ret,
|
Xorriso_report_iso_error(xorriso, nominal_source, ret,
|
||||||
"Cannot add node to tree", 0, "FAILURE", 1|2);
|
"Cannot add node to tree", 0, "FAILURE", 1|2);
|
||||||
return(ret);
|
return(ret);
|
||||||
@ -1674,16 +1690,16 @@ cannot_lstat:;
|
|||||||
} else {
|
} else {
|
||||||
#ifdef NIX
|
#ifdef NIX
|
||||||
ret= iso_tree_add_node(volume, dir, srcpt, &node);
|
ret= iso_tree_add_node(volume, dir, srcpt, &node);
|
||||||
#else
|
|
||||||
ret= Xorriso_tree_graft_node(xorriso, volume, dir, srcpt, img_name,
|
|
||||||
stbuf_src, img_path,
|
|
||||||
&node, 0);
|
|
||||||
#endif
|
|
||||||
if(ret<0) {
|
if(ret<0) {
|
||||||
Xorriso_report_iso_error(xorriso, stbuf_src, ret,
|
Xorriso_report_iso_error(xorriso, stbuf_src, ret,
|
||||||
"Cannot add node to tree", 0, "FAILURE", 1|2);
|
"Cannot add node to tree", 0, "FAILURE", 1|2);
|
||||||
goto was_problem;
|
goto was_problem;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
ret= Xorriso_tree_graft_node(xorriso, volume, dir, srcpt, img_name,
|
||||||
|
stbuf_src, img_path,
|
||||||
|
&node, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(node==NULL) {
|
if(node==NULL) {
|
||||||
@ -2037,6 +2053,7 @@ attach_source:;
|
|||||||
ret= Xorriso_tree_graft_node(xorriso, volume, dir, disk_path_pt, apt,
|
ret= Xorriso_tree_graft_node(xorriso, volume, dir, disk_path_pt, apt,
|
||||||
disk_path, img_path, &node, 0);
|
disk_path, img_path, &node, 0);
|
||||||
if(ret<0) {
|
if(ret<0) {
|
||||||
|
Xorriso_msgs_submit(xorriso, 0, disk_path, 0, "ERRFILE", 0);
|
||||||
sprintf(xorriso->info_text, "Grafting failed: %s = %s",
|
sprintf(xorriso->info_text, "Grafting failed: %s = %s",
|
||||||
Text_shellsafe(img_path,sfe,0), Text_shellsafe(disk_path,sfe2,0));
|
Text_shellsafe(img_path,sfe,0), Text_shellsafe(disk_path,sfe2,0));
|
||||||
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user