Improved error reporting with problems when extracting xattr or ACL

master
Thomas Schmitt 11 years ago
parent 920513356b
commit 9f4fb2c69b
  1. 11
      xorriso/read_run.c

@ -249,7 +249,7 @@ int Xorriso_restore_is_identical(struct XorrisO *xorriso, void *in_node,
int Xorriso_restore_properties(struct XorrisO *xorriso, char *disk_path,
IsoNode *node, int flag)
{
int ret, is_dir= 0;
int ret, is_dir= 0, errno_copy= 0;
mode_t mode;
uid_t uid;
gid_t gid;
@ -285,10 +285,17 @@ int Xorriso_restore_properties(struct XorrisO *xorriso, char *disk_path,
ret= iso_local_set_attrs(disk_path, num_attrs, names, value_lengths,
values, 0);
if(ret < 0) {
errno_copy= errno;
if(ret != (int) ISO_AAIP_NO_SET_LOCAL)
errno_copy= 0;
Xorriso_report_iso_error(xorriso, "", ret,
"Error on iso_local_set_attrs",
0, "FAILURE", 1 | ((ret == -1)<<2) );
sprintf(xorriso->info_text,
"Cannot change ACL or xattr of disk file ");
Text_shellsafe(disk_path, xorriso->info_text, 1);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno, "FAILURE",0);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, errno_copy,
"FAILURE",0);
{ret= 0; goto ex;}
}
}

Loading…
Cancel
Save