- Timestamp:
- Nov 24, 2009 11:09:45 AM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp
r24585 r24889 47 47 # include <unistd.h> 48 48 # include <sys/time.h> 49 # include <sys/statvfs.h> 49 50 #endif 50 51 #ifdef RT_OS_LINUX … … 718 719 719 720 721 RTR3DECL(int) RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree, 722 uint32_t *pcbBlock, uint32_t *pcbSector) 723 { 724 struct statvfs StatVFS; 725 RT_ZERO(StatVFS); 726 if (fstatvfs(hFile, &StatVFS)) 727 return RTErrConvertFromErrno(errno); 728 729 /* 730 * Calc the returned values. 731 */ 732 if (pcbTotal) 733 *pcbTotal = (RTFOFF)StatVFS.f_blocks * StatVFS.f_frsize; 734 if (pcbFree) 735 *pcbFree = (RTFOFF)StatVFS.f_bavail * StatVFS.f_frsize; 736 if (pcbBlock) 737 *pcbBlock = StatVFS.f_frsize; 738 /* no idea how to get the sector... */ 739 if (pcbSector) 740 *pcbSector = 512; 741 742 return VINF_SUCCESS; 743 } 744 745 746 720 747 RTR3DECL(int) RTFileRename(const char *pszSrc, const char *pszDst, unsigned fRename) 721 748 { -
trunk/src/VBox/Runtime/r3/win/fileio-win.cpp
r24341 r24889 790 790 791 791 792 RTR3DECL(int) RTFileQueryFsSizes(RTFILE hFile, PRTFOFF pcbTotal, RTFOFF *pcbFree, 793 uint32_t *pcbBlock, uint32_t *pcbSector) 794 { 795 return VERR_NOT_SUPPORTED; 796 } 797 798 792 799 RTR3DECL(int) RTFileDelete(const char *pszFilename) 793 800 {
Note:
See TracChangeset
for help on using the changeset viewer.