儲存庫 vbox 的更動 34967
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/iprt/vfs.h
r34964 r34967 654 654 * 655 655 * @param hVfsIos The VFS I/O stream handle. 656 */ 657 RTDECL(int) RTVfsIoStrmValidateUtf8Encoding(RTVFSIOSTREAM hVfsIos); 656 * @param fFlags Flags governing the validation, see 657 * RTVFS_VALIDATE_UTF8_XXX. 658 * @param poffError Where to return the error offset. Optional. 659 */ 660 RTDECL(int) RTVfsIoStrmValidateUtf8Encoding(RTVFSIOSTREAM hVfsIos, uint32_t fFlags, PRTFOFF poffError); 661 662 /** @defgroup RTVFS_VALIDATE_UTF8_XXX RTVfsIoStrmValidateUtf8Encoding flags. 663 * @{ */ 664 /** The text must not contain any null terminator codepoints. */ 665 #define RTVFS_VALIDATE_UTF8_NO_NULL RT_BIT_32(0) 666 /** The codepoints must be in the range covered by RTC-3629. */ 667 #define RTVFS_VALIDATE_UTF8_BY_RTC_3629 RT_BIT_32(1) 668 /** Mask of valid flags. */ 669 #define RTVFS_VALIDATE_UTF8_VALID_MASK UINT32_C(0x00000003) 670 /** @} */ 658 671 659 672 /** @} */ -
trunk/src/VBox/Main/ExtPackUtil.cpp
r34965 r34967 803 803 if (RT_SUCCESS(rc)) 804 804 { 805 rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos); 805 rc = RTVfsIoStrmValidateUtf8Encoding(hVfsIos, 806 RTVFS_VALIDATE_UTF8_BY_RTC_3629 | RTVFS_VALIDATE_UTF8_NO_NULL, 807 NULL); 806 808 if (RT_SUCCESS(rc)) 807 809 { -
trunk/src/VBox/Runtime/Makefile.kmk
r34801 r34967 398 398 common/vfs/vfsbase.cpp \ 399 399 common/vfs/vfschain.cpp \ 400 common/vfs/vfsiosmisc.cpp \ 400 401 common/vfs/vfsmemory.cpp \ 401 402 common/vfs/vfsmisc.cpp \ -
trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp
r34964 r34967 2254 2254 2255 2255 2256 RTDECL(int) RTVfsIoStrmValidateUtf8Encoding(RTVFSIOSTREAM hVfsIos)2257 {2258 char achBuf[1024 + 1];2259 size_t cbUsed = 0;2260 int rc;2261 for (;;)2262 {2263 /*2264 * Fill the buffer2265 */2266 size_t cbRead = 0;2267 rc = RTVfsIoStrmRead(hVfsIos, &achBuf[cbUsed], sizeof(achBuf) - cbUsed - 1, true /*fBlocking*/, &cbRead);2268 if (RT_FAILURE(rc))2269 break;2270 cbUsed += cbRead;2271 if (!cbUsed)2272 {2273 Assert(rc == VINF_EOF);2274 break;2275 }2276 2277 /*2278 * Process the data in the buffer, maybe leaving the final chars till2279 * the next round.2280 */2281 /** @todo implement this */2282 }2283 2284 return rc == VINF_EOF ? VINF_SUCCESS : rc;2285 }2286 2287 2288 2256 2289 2257
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器