mirror of
https://github.com/samba-team/samba.git
synced 2025-03-22 02:50:28 +03:00
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 <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit acb72c1ea7fecc9a7e8eb0219096b1bbdfd8850e)
This commit is contained in:
parent
85519ed981
commit
024d123a48
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user