Changeset 77832 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Mar 21, 2019 8:41:23 PM (6 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r77830 r77832 670 670 generic/RTFileCopyByHandlesEx-generic.cpp \ 671 671 generic/RTFileCopyPart-generic.cpp \ 672 generic/RTFileCopyPartEx-generic.cpp \673 672 generic/RTFileQuerySize-generic.cpp \ 674 673 generic/RTFileReadAll-generic.cpp \ … … 822 821 generic/fileio-sg-generic.cpp \ 823 822 generic/fileio-sg-at-generic.cpp \ 823 generic/RTFileCopyPartEx-generic.cpp \ 824 824 generic/RTFileExists-generic.cpp \ 825 825 generic/RTFileSetAllocationSize-generic.cpp \ … … 942 942 r3/linux/time-linux.cpp \ 943 943 r3/linux/thread-affinity-linux.cpp \ 944 r3/linux/RTFileCopyPartEx-linux.cpp \ 944 945 r3/linux/RTFileSetAllocationSize-linux.cpp \ 945 946 r3/linux/RTProcIsRunningByName-linux.cpp \ … … 1018 1019 generic/fileio-sg-generic.cpp \ 1019 1020 generic/fileio-sg-at-generic.cpp \ 1021 generic/RTFileCopyPartEx-generic.cpp \ 1020 1022 generic/RTFileMove-generic.cpp \ 1021 1023 generic/RTFileSetAllocationSize-generic.cpp \ … … 1099 1101 generic/RTDirQueryInfo-generic.cpp \ 1100 1102 generic/RTDirSetTimes-generic.cpp \ 1103 generic/RTFileCopyPartEx-generic.cpp \ 1101 1104 generic/RTFileMove-generic.cpp \ 1102 1105 generic/RTFileSetAllocationSize-generic.cpp \ … … 1184 1187 generic/RTDirQueryInfo-generic.cpp \ 1185 1188 generic/RTDirSetTimes-generic.cpp \ 1189 generic/RTFileCopyPartEx-generic.cpp \ 1186 1190 generic/RTFileMove-generic.cpp \ 1187 1191 generic/RTFileSetAllocationSize-generic.cpp \ … … 1267 1271 generic/RTDirQueryInfo-generic.cpp \ 1268 1272 generic/RTDirSetTimes-generic.cpp \ 1273 generic/RTFileCopyPartEx-generic.cpp \ 1269 1274 generic/RTFileMove-generic.cpp \ 1270 1275 generic/RTLogWriteDebugger-generic.cpp \ … … 1348 1353 generic/RTDirQueryInfo-generic.cpp \ 1349 1354 generic/RTDirSetTimes-generic.cpp \ 1355 generic/RTFileCopyPartEx-generic.cpp \ 1350 1356 generic/RTFileMove-generic.cpp \ 1351 1357 generic/RTLogWriteDebugger-generic.cpp \ … … 1443 1449 generic/fileio-sg-generic.cpp \ 1444 1450 generic/fileio-sg-at-generic.cpp \ 1451 generic/RTFileCopyPartEx-generic.cpp \ 1445 1452 generic/RTFileMove-generic.cpp \ 1446 1453 generic/RTFileSetAllocationSize-generic.cpp \ … … 1794 1801 generic/RTFileCopyEx-generic.cpp \ 1795 1802 generic/RTFileCopyByHandlesEx-generic.cpp \ 1796 generic/RTFileCopyPartEx-generic.cpp \1797 1803 generic/RTFileQuerySize-generic.cpp \ 1798 1804 generic/RTFileReadAll-generic.cpp \ … … 1835 1841 RuntimeBldProg_SOURCES.darwin = $(filter-out \ 1836 1842 generic/cdrom-generic.cpp \ 1843 generic/RTFileCopyPartEx-generic.cpp \ 1837 1844 generic/RTFileMove-generic.cpp \ 1838 1845 generic/RTPathGetCurrentOnDrive-generic.cpp \ … … 1874 1881 generic/RTDirExists-generic.cpp \ 1875 1882 generic/RTDirSetTimes-generic.cpp \ 1883 generic/RTFileCopyPartEx-generic.cpp \ 1876 1884 generic/RTFileExists-generic.cpp \ 1877 1885 generic/RTFileSetAllocationSize-generic.cpp \ … … 1942 1950 generic/RTDirSetTimes-generic.cpp \ 1943 1951 generic/fileio-at-generic.cpp \ 1952 generic/RTFileCopyPartEx-generic.cpp \ 1944 1953 generic/RTFileMove-generic.cpp \ 1945 1954 generic/RTFileSetAllocationSize-generic.cpp \ -
trunk/src/VBox/Runtime/generic/RTFileCopyPartEx-generic.cpp
r77830 r77832 38 38 39 39 40 #ifndef IPRT_FALLBACK_VERSION 40 41 RTDECL(int) RTFileCopyPartPrep(PRTFILECOPYPARTBUFSTATE pBufState, uint64_t cbToCopy) 42 #else 43 static int rtFileCopyPartPrepFallback(PRTFILECOPYPARTBUFSTATE pBufState, uint64_t cbToCopy) 44 #endif 41 45 { 42 46 /* … … 71 75 72 76 77 #ifndef IPRT_FALLBACK_VERSION 73 78 RTDECL(void) RTFileCopyPartCleanup(PRTFILECOPYPARTBUFSTATE pBufState) 79 #else 80 static void rtFileCopyPartCleanupFallback(PRTFILECOPYPARTBUFSTATE pBufState) 81 #endif 74 82 { 75 83 AssertReturnVoid(pBufState->uMagic == RTFILECOPYPARTBUFSTATE_MAGIC); … … 84 92 85 93 94 #ifndef IPRT_FALLBACK_VERSION 86 95 RTDECL(int) RTFileCopyPartEx(RTFILE hFileSrc, RTFOFF offSrc, RTFILE hFileDst, RTFOFF offDst, uint64_t cbToCopy, 87 96 uint32_t fFlags, PRTFILECOPYPARTBUFSTATE pBufState, uint64_t *pcbCopied) 97 #else 98 static int rtFileCopyPartExFallback(RTFILE hFileSrc, RTFOFF offSrc, RTFILE hFileDst, RTFOFF offDst, uint64_t cbToCopy, 99 uint32_t fFlags, PRTFILECOPYPARTBUFSTATE pBufState, uint64_t *pcbCopied) 100 #endif 88 101 { 89 102 /* … … 117 130 do 118 131 { 119 size_t cbThisCopy = (size_t)RT_MIN(cbToCopy , pBufState->cbBuf);132 size_t cbThisCopy = (size_t)RT_MIN(cbToCopy - cbCopied, pBufState->cbBuf); 120 133 size_t cbActual = 0; 121 134 rc = RTFileReadAt(hFileSrc, offSrc + cbCopied, pBufState->pbBuf, cbThisCopy, &cbActual); … … 141 154 return rc; 142 155 } 143 RT_EXPORT_SYMBOL(RTFileCopyPartEx);144 156
Note:
See TracChangeset
for help on using the changeset viewer.