1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

vfs_fruit: refactor fruit_stat_meta()

Handle config->meta in helper functions. No change in behaviour. The next step
will add the correct implementation of fruit_stat_meta_stream().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
This commit is contained in:
Ralph Boehme 2016-12-02 11:05:50 +01:00 committed by Uri Simchoni
parent a3be9e69c3
commit aaf2ae1b2b

View File

@ -3122,9 +3122,9 @@ static int fruit_stat_base(vfs_handle_struct *handle,
return rc;
}
static int fruit_stat_meta(vfs_handle_struct *handle,
struct smb_filename *smb_fname,
bool follow_links)
static int fruit_stat_meta_netatalk(vfs_handle_struct *handle,
struct smb_filename *smb_fname,
bool follow_links)
{
struct adouble *ad = NULL;
@ -3147,6 +3147,30 @@ static int fruit_stat_meta(vfs_handle_struct *handle,
return 0;
}
static int fruit_stat_meta(vfs_handle_struct *handle,
struct smb_filename *smb_fname,
bool follow_links)
{
struct fruit_config_data *config = NULL;
int ret;
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct fruit_config_data, return -1);
switch (config->meta) {
case FRUIT_META_STREAM:
case FRUIT_META_NETATALK:
ret = fruit_stat_meta_netatalk(handle, smb_fname, follow_links);
break;
default:
DBG_ERR("Unexpected meta config [%d]\n", config->meta);
return -1;
}
return ret;
}
static int fruit_stat_rsrc(vfs_handle_struct *handle,
struct smb_filename *smb_fname,
bool follow_links)