From: Ralph Boehme Date: Mon, 8 Oct 2018 16:43:51 +0000 (+0200) Subject: vfs_fruit: add out arg "converted_xattr" to ad_convert_xattr X-Git-Tag: tdb-1.3.17~1344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=acb72c1ea7fecc9a7e8eb0219096b1bbdfd8850e;p=thirdparty%2Fsamba.git vfs_fruit: add out arg "converted_xattr" to ad_convert_xattr Used to let the caller know if a conversion has been done. Currently not used in the caller, that comes next. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13649 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 9987f354d2b..1f4a397b806 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -995,7 +995,8 @@ static bool ad_convert_move_reso(struct adouble *ad, } static bool ad_convert_xattr(struct adouble *ad, - const struct smb_filename *smb_fname) + const struct smb_filename *smb_fname, + bool *converted_xattr) { static struct char_mappings **string_replace_cmaps = NULL; char *map = MAP_FAILED; @@ -1007,6 +1008,8 @@ static bool ad_convert_xattr(struct adouble *ad, int rc; bool ok; + *converted_xattr = false; + if (ad->adx_header.adx_num_attrs == 0) { return true; } @@ -1145,6 +1148,7 @@ static bool ad_convert_xattr(struct adouble *ad, goto fail; } + *converted_xattr = true; ok = true; fail: @@ -1290,12 +1294,13 @@ static int ad_convert(struct adouble *ad, const struct smb_filename *smb_fname) { bool ok; + bool converted_xattr = false; if (ad_getentrylen(ad, ADEID_FINDERI) == ADEDLEN_FINDERI) { return 0; } - ok = ad_convert_xattr(ad, smb_fname); + ok = ad_convert_xattr(ad, smb_fname, &converted_xattr); if (!ok) { return -1; }