From 8f1412a3485b8eb70944ce1271882386aa392242 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 8 Aug 2011 07:20:02 +0000 Subject: [PATCH] Improved error reporting with problems when extracting xattr or ACL --- xorriso/read_run.c | 11 +++++++++-- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xorriso/read_run.c b/xorriso/read_run.c index 6f71e584..002a6b38 100644 --- a/xorriso/read_run.c +++ b/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;} } } diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 894ea3af..03c2be04 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.08.07.120001" +#define Xorriso_timestamP "2011.08.08.071649"