2 #include <sys/statvfs.h>
8 #include <libsmbclient.h>
9 #include "get_auth_data_fn.h"
12 int main(int argc, char * argv[])
18 struct statvfs statvfsbuf;
20 smbc_init(get_auth_data_fn, debug);
24 fprintf(stdout, "Path: ");
26 fgets(path, sizeof(path) - 1, stdin);
27 if (strlen(path) == 0)
32 p = path + strlen(path) - 1;
38 ret = smbc_statvfs(path, &statvfsbuf);
47 printf("Block Size: %lu\n", statvfsbuf.f_bsize);
48 printf("Fragment Size: %lu\n", statvfsbuf.f_frsize);
49 printf("Blocks: %llu\n",
50 (unsigned long long) statvfsbuf.f_blocks);
51 printf("Free Blocks: %llu\n",
52 (unsigned long long) statvfsbuf.f_bfree);
53 printf("Available Blocks: %llu\n",
54 (unsigned long long) statvfsbuf.f_bavail);
55 printf("Files : %llu\n",
56 (unsigned long long) statvfsbuf.f_files);
57 printf("Free Files: %llu\n",
58 (unsigned long long) statvfsbuf.f_ffree);
59 printf("Available Files: %llu\n",
60 (unsigned long long) statvfsbuf.f_favail);
62 printf("File System ID: %lu\n",
63 (unsigned long) statvfsbuf.f_fsid);
67 printf("Flags: 0x%lx\n", statvfsbuf.f_flag);
68 printf("Extended Features: ");
70 if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_NO_UNIXCIFS)
72 printf("NO_UNIXCIFS ");
79 if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_CASE_INSENSITIVE)
81 printf("CASE_INSENSITIVE ");
85 printf("case_sensitive ");
88 if (statvfsbuf.f_flag & SMBC_VFS_FEATURE_DFS)