diff options
author | Derrell Lipman <derrell.lipman@unwireduniverse.com> | 2009-02-10 10:28:32 -0500 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-02-16 09:56:59 +0100 |
commit | 5ced5122517319e56e1bff1c8dd453edbf5287fd (patch) | |
tree | 3a04bf493fa887ae9786b27a7107364e4f6ffbed /examples | |
parent | 892a3e62ed1b4f6cb2c55af42ab55cf29a4f22da (diff) | |
download | samba-5ced5122517319e56e1bff1c8dd453edbf5287fd.tar.gz |
[Bug 6069] Add a fstatvfs function for libsmbclient
- Reverse the sense of the flags. Since the fstatvfs() function on POSIX-like
systems would almost certainly indicate case sensitivity (for example),
leave the bit turned off if the result is the POSIX-like result just as if
issued on a typical local file system on a POSIX system.
Derrell
(cherry picked from commit 0acc962e3968253a3f64b5a92def177ced44994d)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/libsmbclient/testfstatvfs.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/examples/libsmbclient/testfstatvfs.c b/examples/libsmbclient/testfstatvfs.c index 9db70cf476a..fbb51f14814 100644 --- a/examples/libsmbclient/testfstatvfs.c +++ b/examples/libsmbclient/testfstatvfs.c @@ -70,27 +70,35 @@ int main(int argc, char * argv[]) { perror("fstatvfs"); } - else if (statvfsbuf.f_flag == 0) - { - printf("No capabilities found\n"); - } else { - printf("Capabilities: "); + printf("Features: "); - if (statvfsbuf.f_flag & SMBC_VFS_CAP_UNIXCIFS) + if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_UNIXCIFS) + { + printf("NO_UNIXCIFS "); + } + else { - printf("UNIXCIFS "); + printf("unixcifs "); } - if (statvfsbuf.f_flag & SMBC_VFS_CAP_CASE_SENSITIVE) + if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_CASE_INSENSITIVE) { - printf("CASE_SENSITIVE "); + printf("CASE_INSENSITIVE "); + } + else + { + printf("case_sensitive "); } - if (statvfsbuf.f_flag & SMBC_VFS_CAP_DFS) + if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_DFS) + { + printf("NO_DFS "); + } + else { - printf("DFS "); + printf("dfs "); } printf("\n"); |