Changeset 25076 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Nov 28, 2009 10:55:30 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r25059 r25076 443 443 r3/linux/time-linux.cpp \ 444 444 r3/linux/RTProcIsRunningByName-linux.cpp \ 445 r3/posix/RTFileQueryFsSizes-posix.cpp \ 445 446 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 446 447 r3/posix/alloc-posix.cpp \ … … 511 512 r3/os2/thread-os2.cpp \ 512 513 r3/os2/time-os2.cpp \ 514 r3/posix/RTFileQueryFsSizes-posix.cpp \ 513 515 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 514 516 r3/posix/alloc-posix.cpp \ … … 548 550 r3/darwin/sched-darwin.cpp \ 549 551 r3/darwin/time-darwin.cpp \ 552 r3/posix/RTFileQueryFsSizes-posix.cpp \ 550 553 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 551 554 r3/posix/dir-posix.cpp \ … … 592 595 r3/freebsd/alloc-freebsd.cpp \ 593 596 r3/freebsd/rtProcInitExePath-freebsd.cpp \ 597 r3/posix/RTFileQueryFsSizes-posix.cpp \ 594 598 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 595 599 r3/posix/dir-posix.cpp \ … … 628 632 generic/uuid-generic.cpp \ 629 633 generic/RTProcIsRunningByName-generic.cpp \ 634 r3/posix/RTFileQueryFsSizes-posix.cpp \ 630 635 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 631 636 r3/posix/dir-posix.cpp \ … … 692 697 l4/timer-l4env.cpp \ 693 698 l4/utf8-l4env.cpp \ 699 r3/posix/RTFileQueryFsSizes-posix.cpp \ 694 700 r3/posix/alloc-posix.cpp \ 695 701 r3/posix/dir-posix.cpp \ -
trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp
r24889 r25076 47 47 # include <unistd.h> 48 48 # include <sys/time.h> 49 # include <sys/statvfs.h>50 49 #endif 51 50 #ifdef RT_OS_LINUX … … 719 718 720 719 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 747 720 RTR3DECL(int) RTFileRename(const char *pszSrc, const char *pszDst, unsigned fRename) 748 721 {
Note:
See TracChangeset
for help on using the changeset viewer.