From 0037815453fa6141d3c0325c3ab197326324ab53 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 23 May 2017 10:40:47 -0700 Subject: [PATCH] s3: VFS: Change SMB_VFS_DISK_FREE to use const struct smb_filename * instead of const char *. We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe --- examples/VFS/skel_opaque.c | 8 +++-- examples/VFS/skel_transparent.c | 10 +++--- source3/include/vfs.h | 15 ++++++--- source3/include/vfs_macros.h | 8 ++--- source3/modules/vfs_cap.c | 25 ++++++++++++--- source3/modules/vfs_ceph.c | 9 ++++-- source3/modules/vfs_default.c | 10 +++--- source3/modules/vfs_fake_dfq.c | 11 ++++--- source3/modules/vfs_full_audit.c | 10 +++--- source3/modules/vfs_glusterfs.c | 8 +++-- source3/modules/vfs_gpfs.c | 24 ++++++++------ source3/modules/vfs_shadow_copy2.c | 43 ++++++++++++++++--------- source3/modules/vfs_snapper.c | 51 ++++++++++++++++++++---------- source3/modules/vfs_time_audit.c | 12 ++++--- source3/smbd/dfree.c | 2 +- source3/smbd/vfs.c | 9 ++++-- source3/torture/cmd_vfs.c | 12 ++++++- 17 files changed, 178 insertions(+), 89 deletions(-) diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index aeb1ff37b5f..40951db35e3 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -44,9 +44,11 @@ static void skel_disconnect(vfs_handle_struct *handle) ; } -static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) +static uint64_t skel_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { *bsize = 0; *dfree = 0; diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index f3adae3978f..83c0c2ae4d9 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -48,11 +48,13 @@ static void skel_disconnect(vfs_handle_struct *handle) SMB_VFS_NEXT_DISCONNECT(handle); } -static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) +static uint64_t skel_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree, dsize); + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } static int skel_get_quota(vfs_handle_struct *handle, const char *path, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 93ec6e8f49a..4a7179a094b 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -216,6 +216,8 @@ /* Version 37 - Change mknod from const char * to const struct smb_filename * */ /* Version 37 - Change chflags from const char * to const struct smb_filename * */ +/* Version 37 - Change disk_free from const char * + to const struct smb_filename * */ #define SMB_VFS_INTERFACE_VERSION 37 @@ -600,8 +602,11 @@ struct vfs_fn_pointers { int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user); void (*disconnect_fn)(struct vfs_handle_struct *handle); - uint64_t (*disk_free_fn)(struct vfs_handle_struct *handle, const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize); + uint64_t (*disk_free_fn)(struct vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize); int (*get_quota_fn)(struct vfs_handle_struct *handle, const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); @@ -1056,8 +1061,10 @@ int smb_vfs_call_connect(struct vfs_handle_struct *handle, const char *service, const char *user); void smb_vfs_call_disconnect(struct vfs_handle_struct *handle); uint64_t smb_vfs_call_disk_free(struct vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize); + const struct smb_filename *smb_filename, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize); int smb_vfs_call_get_quota(struct vfs_handle_struct *handle, const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 701dc534984..cd34ec981c1 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -39,10 +39,10 @@ #define SMB_VFS_NEXT_DISCONNECT(handle) \ smb_vfs_call_disconnect((handle)->next) -#define SMB_VFS_DISK_FREE(conn, path, bsize, dfree ,dsize) \ - smb_vfs_call_disk_free((conn)->vfs_handles, (path), (bsize), (dfree), (dsize)) -#define SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree ,dsize)\ - smb_vfs_call_disk_free((handle)->next, (path), (bsize), (dfree), (dsize)) +#define SMB_VFS_DISK_FREE(conn, smb_fname, bsize, dfree ,dsize) \ + smb_vfs_call_disk_free((conn)->vfs_handles, (smb_fname), (bsize), (dfree), (dsize)) +#define SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree ,dsize)\ + smb_vfs_call_disk_free((handle)->next, (smb_fname), (bsize), (dfree), (dsize)) #define SMB_VFS_GET_QUOTA(conn, path, qtype, id, qt) \ smb_vfs_call_get_quota((conn)->vfs_handles, (path), (qtype), (id), (qt)) diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index eba58961926..cf3bb94498c 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -29,16 +29,31 @@ static char *capencode(TALLOC_CTX *ctx, const char *from); static char *capdecode(TALLOC_CTX *ctx, const char *from); -static uint64_t cap_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, uint64_t *dfree, uint64_t *dsize) +static uint64_t cap_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { - char *cappath = capencode(talloc_tos(), path); + char *capname = capencode(talloc_tos(), smb_fname->base_name); + struct smb_filename *cap_smb_fname = NULL; - if (!cappath) { + if (!capname) { + errno = ENOMEM; + return (uint64_t)-1; + } + cap_smb_fname = synthetic_smb_fname(talloc_tos(), + capname, + NULL, + NULL, + smb_fname->flags); + if (cap_smb_fname == NULL) { + TALLOC_FREE(capname); errno = ENOMEM; return (uint64_t)-1; } - return SMB_VFS_NEXT_DISK_FREE(handle, cappath, bsize, dfree, dsize); + return SMB_VFS_NEXT_DISK_FREE(handle, cap_smb_fname, + bsize, dfree, dsize); } static int cap_get_quota(vfs_handle_struct *handle, const char *path, diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index d936738ff5a..1244468abed 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -175,13 +175,16 @@ static void cephwrap_disconnect(struct vfs_handle_struct *handle) /* Disk operations */ static uint64_t cephwrap_disk_free(struct vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { struct statvfs statvfs_buf; int ret; - if (!(ret = ceph_statfs(handle->data, path, &statvfs_buf))) { + if (!(ret = ceph_statfs(handle->data, smb_fname->base_name, + &statvfs_buf))) { /* * Provide all the correct values. */ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index b2c6c28f87b..1c267287cff 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -55,11 +55,13 @@ static void vfswrap_disconnect(vfs_handle_struct *handle) /* Disk operations */ -static uint64_t vfswrap_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, uint64_t *dfree, - uint64_t *dsize) +static uint64_t vfswrap_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { - if (sys_fsusage(path, dfree, dsize) != 0) { + if (sys_fsusage(smb_fname->base_name, dfree, dsize) != 0) { return (uint64_t)-1; } diff --git a/source3/modules/vfs_fake_dfq.c b/source3/modules/vfs_fake_dfq.c index f13ec7de40c..5e8879fe1cc 100644 --- a/source3/modules/vfs_fake_dfq.c +++ b/source3/modules/vfs_fake_dfq.c @@ -50,8 +50,11 @@ static uint64_t dfq_load_param(int snum, const char *path, const char *section, return ret; } -static uint64_t dfq_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, uint64_t *dfree, uint64_t *dsize) +static uint64_t dfq_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { uint64_t free_1k; int snum = SNUM(handle->conn); @@ -61,13 +64,13 @@ static uint64_t dfq_disk_free(vfs_handle_struct *handle, const char *path, /* look up the params based on real path to be resilient * to refactoring of path<->realpath */ - rpath = SMB_VFS_NEXT_REALPATH(handle, path); + rpath = SMB_VFS_NEXT_REALPATH(handle, smb_fname->base_name); if (rpath != NULL) { dfq_bsize = dfq_load_param(snum, rpath, "df", "block size", 0); } if (dfq_bsize == 0) { SAFE_FREE(rpath); - return SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 634caf09a61..916825767bf 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -676,16 +676,18 @@ static void smb_full_audit_disconnect(vfs_handle_struct *handle) } static uint64_t smb_full_audit_disk_free(vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { uint64_t result; - result = SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree, dsize); + result = SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); /* Don't have a reasonable notion of failure here */ - do_log(SMB_VFS_OP_DISK_FREE, True, handle, "%s", path); + do_log(SMB_VFS_OP_DISK_FREE, True, handle, "%s", smb_fname->base_name); return result; } diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 878c5078c58..cabb86120d9 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -375,13 +375,15 @@ static void vfs_gluster_disconnect(struct vfs_handle_struct *handle) } static uint64_t vfs_gluster_disk_free(struct vfs_handle_struct *handle, - const char *path, uint64_t *bsize_p, - uint64_t *dfree_p, uint64_t *dsize_p) + const struct smb_filename *smb_fname, + uint64_t *bsize_p, + uint64_t *dfree_p, + uint64_t *dsize_p) { struct statvfs statvfs = { 0, }; int ret; - ret = glfs_statvfs(handle->data, path, &statvfs); + ret = glfs_statvfs(handle->data, smb_fname->base_name, &statvfs); if (ret < 0) { return -1; } diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index aeb0836b866..9898d443915 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -2160,9 +2160,11 @@ static void vfs_gpfs_disk_free_quota(struct gpfs_quotaInfo qi, time_t cur_time, } } -static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, const char *path, - uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) +static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { struct security_unix_token *utok; struct gpfs_quotaInfo qi_user = { 0 }, qi_group = { 0 }; @@ -2173,14 +2175,14 @@ static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, const char *path, SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, return (uint64_t)-1); if (!config->dfreequota) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } - err = sys_fsusage(path, dfree, dsize); + err = sys_fsusage(smb_fname->base_name, dfree, dsize); if (err) { DEBUG (0, ("Could not get fs usage, errno %d\n", errno)); - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } @@ -2192,15 +2194,17 @@ static uint64_t vfs_gpfs_disk_free(vfs_handle_struct *handle, const char *path, utok = handle->conn->session_info->unix_token; - err = get_gpfs_quota(path, GPFS_USRQUOTA, utok->uid, &qi_user); + err = get_gpfs_quota(smb_fname->base_name, + GPFS_USRQUOTA, utok->uid, &qi_user); if (err) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } - err = get_gpfs_quota(path, GPFS_GRPQUOTA, utok->gid, &qi_group); + err = get_gpfs_quota(smb_fname->base_name, + GPFS_GRPQUOTA, utok->gid, &qi_group); if (err) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 35c08549afa..e1f30398c1d 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -2742,40 +2742,53 @@ done: } static uint64_t shadow_copy2_disk_free(vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { time_t timestamp = 0; char *stripped = NULL; - ssize_t ret; int saved_errno = 0; - char *conv; + char *conv = NULL; + struct smb_filename *conv_smb_fname = NULL; + uint64_t ret = (uint64_t)-1; - if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, path, - ×tamp, &stripped)) { - return -1; + if (!shadow_copy2_strip_snapshot(talloc_tos(), + handle, + smb_fname->base_name, + ×tamp, + &stripped)) { + return (uint64_t)-1; } if (timestamp == 0) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } - conv = shadow_copy2_convert(talloc_tos(), handle, stripped, timestamp); TALLOC_FREE(stripped); if (conv == NULL) { - return -1; + return (uint64_t)-1; } - - ret = SMB_VFS_NEXT_DISK_FREE(handle, conv, bsize, dfree, dsize); - - if (ret == -1) { + conv_smb_fname = synthetic_smb_fname(talloc_tos(), + conv, + NULL, + NULL, + smb_fname->flags); + if (conv_smb_fname == NULL) { + TALLOC_FREE(conv); + return (uint64_t)-1; + } + ret = SMB_VFS_NEXT_DISK_FREE(handle, conv_smb_fname, + bsize, dfree, dsize); + if (ret == (uint64_t)-1) { saved_errno = errno; } TALLOC_FREE(conv); + TALLOC_FREE(conv_smb_fname); if (saved_errno != 0) { errno = saved_errno; } - return ret; } diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index ec23c616aae..774f7ee3c69 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -2982,36 +2982,53 @@ static int snapper_gmt_get_real_filename(struct vfs_handle_struct *handle, } static uint64_t snapper_gmt_disk_free(vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { - time_t timestamp; - char *stripped; - ssize_t ret; - int saved_errno; - char *conv; + time_t timestamp = 0; + char *stripped = NULL; + uint64_t ret; + int saved_errno = 0; + char *conv = NULL; + struct smb_filename *conv_smb_fname = NULL; - if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, path, - ×tamp, &stripped)) { - return -1; + if (!snapper_gmt_strip_snapshot(talloc_tos(), handle, + smb_fname->base_name, ×tamp, &stripped)) { + return (uint64_t)-1; } if (timestamp == 0) { - return SMB_VFS_NEXT_DISK_FREE(handle, path, + return SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); } conv = snapper_gmt_convert(talloc_tos(), handle, stripped, timestamp); TALLOC_FREE(stripped); if (conv == NULL) { - return -1; + return (uint64_t)-1; + } + conv_smb_fname = synthetic_smb_fname(talloc_tos(), + conv, + NULL, + NULL, + smb_fname->flags); + if (conv_smb_fname == NULL) { + TALLOC_FREE(conv); + errno = ENOMEM; + return (uint64_t)-1; } - ret = SMB_VFS_NEXT_DISK_FREE(handle, conv, bsize, dfree, dsize); - - saved_errno = errno; - TALLOC_FREE(conv); - errno = saved_errno; + ret = SMB_VFS_NEXT_DISK_FREE(handle, conv_smb_fname, + bsize, dfree, dsize); + if (ret == (uint64_t)-1) { + saved_errno = errno; + } + TALLOC_FREE(conv_smb_fname); + if (saved_errno != 0) { + errno = saved_errno; + } return ret; } diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index aa882bb7700..092474fd0d8 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -157,21 +157,25 @@ static void smb_time_audit_disconnect(vfs_handle_struct *handle) } static uint64_t smb_time_audit_disk_free(vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { uint64_t result; struct timespec ts1,ts2; double timediff; clock_gettime_mono(&ts1); - result = SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree, dsize); + result = SMB_VFS_NEXT_DISK_FREE(handle, smb_fname, bsize, dfree, dsize); clock_gettime_mono(&ts2); timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9; /* Don't have a reasonable notion of failure here */ if (timediff > audit_timeout) { - smb_time_audit_log_fname("disk_free", timediff, path); + smb_time_audit_log_fname("disk_free", + timediff, + smb_fname->base_name); } return result; diff --git a/source3/smbd/dfree.c b/source3/smbd/dfree.c index 7e58daa45cf..a702d083a11 100644 --- a/source3/smbd/dfree.c +++ b/source3/smbd/dfree.c @@ -118,7 +118,7 @@ uint64_t sys_disk_free(connection_struct *conn, struct smb_filename *fname, syscmd, strerror(errno) )); } - if (SMB_VFS_DISK_FREE(conn, path, bsize, dfree, dsize) == + if (SMB_VFS_DISK_FREE(conn, fname, bsize, dfree, dsize) == (uint64_t)-1) { DBG_ERR("VFS disk_free failed. Error was : %s\n", strerror(errno)); diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 9248091153a..f91e9e33a02 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1468,11 +1468,14 @@ void smb_vfs_call_disconnect(struct vfs_handle_struct *handle) } uint64_t smb_vfs_call_disk_free(struct vfs_handle_struct *handle, - const char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) + const struct smb_filename *smb_fname, + uint64_t *bsize, + uint64_t *dfree, + uint64_t *dsize) { VFS_FIND(disk_free); - return handle->fns->disk_free_fn(handle, path, bsize, dfree, dsize); + return handle->fns->disk_free_fn(handle, smb_fname, + bsize, dfree, dsize); } int smb_vfs_call_get_quota(struct vfs_handle_struct *handle, const char *path, diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index 68def352776..8d7d2a7f175 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -116,13 +116,23 @@ static NTSTATUS cmd_disconnect(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a static NTSTATUS cmd_disk_free(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) { + struct smb_filename *smb_fname = NULL; uint64_t diskfree, bsize, dfree, dsize; if (argc != 2) { printf("Usage: disk_free \n"); return NT_STATUS_OK; } - diskfree = SMB_VFS_DISK_FREE(vfs->conn, argv[1], &bsize, &dfree, &dsize); + smb_fname = synthetic_smb_fname(talloc_tos(), + argv[1], + NULL, + NULL, + ssf_flags()); + if (smb_fname == NULL) { + return NT_STATUS_NO_MEMORY; + } + diskfree = SMB_VFS_DISK_FREE(vfs->conn, smb_fname, + &bsize, &dfree, &dsize); printf("disk_free: %lu, bsize = %lu, dfree = %lu, dsize = %lu\n", (unsigned long)diskfree, (unsigned long)bsize, -- 2.34.1