summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/libsmbclient/testfstatvfs.c3
-rw-r--r--examples/libsmbclient/teststatvfs.c3
-rw-r--r--source3/include/libsmb_internal.h4
-rw-r--r--source3/include/libsmbclient.h25
-rw-r--r--source3/libsmb/libsmb_compat.c4
-rw-r--r--source3/libsmb/libsmb_stat.c4
6 files changed, 15 insertions, 28 deletions
diff --git a/examples/libsmbclient/testfstatvfs.c b/examples/libsmbclient/testfstatvfs.c
index 815afac866..b4dafefff6 100644
--- a/examples/libsmbclient/testfstatvfs.c
+++ b/examples/libsmbclient/testfstatvfs.c
@@ -1,4 +1,5 @@
#include <sys/types.h>
+#include <sys/statvfs.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -17,7 +18,7 @@ int main(int argc, char * argv[])
char * p;
char path[2048];
struct stat statbuf;
- struct smbc_statvfs statvfsbuf;
+ struct statvfs statvfsbuf;
smbc_init(get_auth_data_fn, debug);
diff --git a/examples/libsmbclient/teststatvfs.c b/examples/libsmbclient/teststatvfs.c
index b9509d2e07..8812002d5c 100644
--- a/examples/libsmbclient/teststatvfs.c
+++ b/examples/libsmbclient/teststatvfs.c
@@ -1,4 +1,5 @@
#include <sys/types.h>
+#include <sys/statvfs.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -17,7 +18,7 @@ int main(int argc, char * argv[])
char * p;
char path[2048];
struct stat statbuf;
- struct smbc_statvfs statvfsbuf;
+ struct statvfs statvfsbuf;
smbc_init(get_auth_data_fn, debug);
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index d3683eb3dc..166685c380 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -506,13 +506,13 @@ SMBC_fstat_ctx(SMBCCTX *context,
int
SMBC_statvfs_ctx(SMBCCTX *context,
char *path,
- struct smbc_statvfs *st);
+ struct statvfs *st);
int
SMBC_fstatvfs_ctx(SMBCCTX *context,
SMBCFILE *file,
- struct smbc_statvfs *st);
+ struct statvfs *st);
/* Functions in libsmb_xattr.c */
diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
index 3bea0897d1..d35d9de6ea 100644
--- a/source3/include/libsmbclient.h
+++ b/source3/include/libsmbclient.h
@@ -75,6 +75,7 @@ extern "C" {
/* Make sure we have the following includes for now ... */
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/statvfs.h>
#include <fcntl.h>
#include <utime.h>
@@ -173,22 +174,6 @@ typedef enum smbc_smb_encrypt_level
SMBC_ENCRYPTLEVEL_REQUIRE = 2
} smbc_smb_encrypt_level;
-/**
- * Use a system independent statvfs struct for smbclient.
- */
-struct smbc_statvfs {
- fsblkcnt_t f_bavail;
- fsblkcnt_t f_bfree;
- fsblkcnt_t f_blocks;
- fsfilcnt_t f_favail;
- fsfilcnt_t f_ffree;
- fsfilcnt_t f_files;
- unsigned long f_bsize;
- unsigned long f_flag;
- unsigned long f_frsize;
- unsigned long f_fsid;
- unsigned long f_namemax;
-};
/**
* Capabilities set in the f_flag field of struct statvfs, from
@@ -887,13 +872,13 @@ void smbc_setFunctionFstat(SMBCCTX *c, smbc_fstat_fn fn);
typedef int (*smbc_statvfs_fn)(SMBCCTX *c,
char *path,
- struct smbc_statvfs *st);
+ struct statvfs *st);
smbc_statvfs_fn smbc_getFunctionStatVFS(SMBCCTX *c);
void smbc_setFunctionStatVFS(SMBCCTX *c, smbc_statvfs_fn fn);
typedef int (*smbc_fstatvfs_fn)(SMBCCTX *c,
SMBCFILE *file,
- struct smbc_statvfs *st);
+ struct statvfs *st);
smbc_fstatvfs_fn smbc_getFunctionFstatVFS(SMBCCTX *c);
void smbc_setFunctionFstatVFS(SMBCCTX *c, smbc_fstatvfs_fn fn);
@@ -1655,7 +1640,7 @@ int smbc_fstat(int fd, struct stat *st);
*/
int
smbc_statvfs(char *url,
- struct smbc_statvfs *st);
+ struct statvfs *st);
/**@ingroup attribute
* Get file system information via an file descriptor.
@@ -1678,7 +1663,7 @@ smbc_statvfs(char *url,
*/
int
smbc_fstatvfs(int fd,
- struct smbc_statvfs *st);
+ struct statvfs *st);
/**@ingroup attribute
diff --git a/source3/libsmb/libsmb_compat.c b/source3/libsmb/libsmb_compat.c
index 95485dc102..56d113f31a 100644
--- a/source3/libsmb/libsmb_compat.c
+++ b/source3/libsmb/libsmb_compat.c
@@ -331,14 +331,14 @@ smbc_fstat(int fd,
int
smbc_statvfs(char *path,
- struct smbc_statvfs *st)
+ struct statvfs *st)
{
return smbc_getFunctionStatVFS(statcont)(statcont, path, st);
}
int
smbc_fstatvfs(int fd,
- struct smbc_statvfs *st)
+ struct statvfs *st)
{
SMBCFILE * file = find_fd(fd);
return smbc_getFunctionFstatVFS(statcont)(statcont, file, st);
diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index 0ad40e878a..d589f7ef71 100644
--- a/source3/libsmb/libsmb_stat.c
+++ b/source3/libsmb/libsmb_stat.c
@@ -308,7 +308,7 @@ SMBC_fstat_ctx(SMBCCTX *context,
int
SMBC_statvfs_ctx(SMBCCTX *context,
char *path,
- struct smbc_statvfs *st)
+ struct statvfs *st)
{
int ret;
bool bIsDir;
@@ -360,7 +360,7 @@ SMBC_statvfs_ctx(SMBCCTX *context,
int
SMBC_fstatvfs_ctx(SMBCCTX *context,
SMBCFILE *file,
- struct smbc_statvfs *st)
+ struct statvfs *st)
{
uint32 fs_attrs = 0;
struct cli_state *cli = file->srv->cli;