Home
last modified time | relevance | path

Searched refs:diskInfo (Results 1 – 2 of 2) sorted by relevance

/DragonOS/user/apps/test_statfs/
H A Dmain.c6 struct statfs diskInfo; in main() local
9 statfs("/bin/about.elf", &diskInfo); in main()
10 unsigned long long blocksize1 = diskInfo.f_bsize; //每个block里包含的字节数 in main()
11 unsigned long long totalsize = blocksize1 * diskInfo.f_blocks;//总的字节数,f_blocks为block的数目 in main()
16 unsigned long long freeDisk = diskInfo.f_bfree * blocksize1; //剩余空间的大小 in main()
17 unsigned long long availableDisk = diskInfo.f_bavail * blocksize1; //可用空间大小 in main()
23 printf("diskInfo address: %p\n", diskInfo); in main()
24 printf("f_type= %lu\n", diskInfo.f_type); in main()
25 printf("f_bsize = %lu\n", diskInfo.f_bsize); in main()
26 printf("f_blocks = %d\n", diskInfo.f_blocks); in main()
[all …]
/DragonOS/user/apps/test_fstatfs/
H A Dmain.c11 struct statfs diskInfo; in main() local
14 fstatfs(fd, &diskInfo); in main()
15 unsigned long long blocksize1 = diskInfo.f_bsize; //每个block里包含的字节数 in main()
16 unsigned long long totalsize = blocksize1 * diskInfo.f_blocks;//总的字节数,f_blocks为block的数目 in main()
21 unsigned long long freeDisk = diskInfo.f_bfree * blocksize1; //剩余空间的大小 in main()
22 unsigned long long availableDisk = diskInfo.f_bavail * blocksize1; //可用空间大小 in main()
28 printf("diskInfo address: %p\n", diskInfo); in main()
29 printf("f_type= %lu\n", diskInfo.f_type); in main()
30 printf("f_bsize = %lu\n", diskInfo.f_bsize); in main()
31 printf("f_blocks = %d\n", diskInfo.f_blocks); in main()
[all …]