diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2009-02-13 16:47:54 -0500 |
---|---|---|
committer | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2009-02-14 09:44:36 -0500 |
commit | 352c97561e9de6ccd0102859d18ed15913042622 (patch) | |
tree | 3959fae8277a9218bac8d70a57a9f77638852a2b /source3/include | |
parent | 1c9630bf4df4315e0c7b72ac126c43b49f499834 (diff) | |
download | samba-352c97561e9de6ccd0102859d18ed15913042622.tar.gz samba-352c97561e9de6ccd0102859d18ed15913042622.tar.bz2 samba-352c97561e9de6ccd0102859d18ed15913042622.zip |
[Bug 6069] Add a fstatvfs function for libsmbclient
- Revert Tim's changes for the moment. I need to see what the issue is and
arrange to use "struct statvfs" if at all possible.
Derrell
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/libsmb_internal.h | 4 | ||||
-rw-r--r-- | source3/include/libsmbclient.h | 25 |
2 files changed, 7 insertions, 22 deletions
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 |