]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: add out arg "converted_xattr" to ad_convert_xattr
authorRalph Boehme <slow@samba.org>
Mon, 8 Oct 2018 16:43:51 +0000 (18:43 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 10 Oct 2018 20:22:15 +0000 (22:22 +0200)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_fruit.c

index 9987f354d2b4defe491f22992e189de36a1198b9..1f4a397b806196fe6960cdf19c5a9150ef67d2ff 100644 (file)
@@ -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;
        }