Changeset 6992 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Feb 18, 2008 1:34:17 PM (17 years ago)
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/fileio.cpp
r6433 r6992 142 142 #endif 143 143 || (fOpen & (RTFILE_O_TRUNCATE | RTFILE_O_WRITE)) == RTFILE_O_TRUNCATE 144 || ( fOpen & RTFILE_O_NOT_CONTENT_INDEXED 145 && !( (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_OPEN_CREATE 146 || (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE 147 || (fOpen & RTFILE_O_ACTION_MASK) == RTFILE_O_CREATE_REPLACE)) 144 148 ) 145 149 { … … 219 223 220 224 /** 221 * Determine the maximum file size. 222 * 223 * @returns The max size of the file. 225 * Determine the maximum file size. 226 * 227 * @returns The max size of the file. 224 228 * -1 on failure, the file position is undefined. 225 * @param File Handle to the file. 226 * @see RTFileGetMaxSizeEx. 229 * @param File Handle to the file. 230 * @see RTFileGetMaxSizeEx. 227 231 */ 228 232 RTR3DECL(RTFOFF) RTFileGetMaxSize(RTFILE File) … … 235 239 236 240 /** 237 * Determine the maximum file size. 238 * 241 * Determine the maximum file size. 242 * 239 243 * @returns IPRT status code. 240 * @param File Handle to the file. 241 * @param pcbMax Where to store the max file size. 244 * @param File Handle to the file. 245 * @param pcbMax Where to store the max file size. 242 246 * @see RTFileGetMaxSize. 243 247 */ 244 248 RTR3DECL(int) RTFileGetMaxSizeEx(RTFILE File, PRTFOFF pcbMax) 245 249 { 246 /* 247 * Save the current location 250 /* 251 * Save the current location 248 252 */ 249 253 uint64_t offOld; … … 253 257 254 258 /* 255 * Perform a binary search for the max file size. 259 * Perform a binary search for the max file size. 256 260 */ 257 261 uint64_t offLow = 0; 258 262 uint64_t offHigh = 8 * _1T; /* we don't need bigger files */ 259 /** @todo r=bird: This isn't doing the trick for windows (at least not vista). 260 * Close to offHigh is returned regardless of NTFS or FAT32. 261 * We might have to make this code OS specific... 262 * In the worse case, we'll have to try GetVolumeInformationByHandle on vista and fall 263 /** @todo r=bird: This isn't doing the trick for windows (at least not vista). 264 * Close to offHigh is returned regardless of NTFS or FAT32. 265 * We might have to make this code OS specific... 266 * In the worse case, we'll have to try GetVolumeInformationByHandle on vista and fall 263 267 * back on NtQueryVolumeInformationFile(,,,, FileFsAttributeInformation) else where, and 264 268 * check for known file system names. (For LAN shares we'll have to figure out the remote 265 * file system.) */ 269 * file system.) */ 266 270 //uint64_t offHigh = INT64_MAX; 267 271 for (;;) -
trunk/src/VBox/Runtime/r3/win/fileio-win.cpp
r6991 r6992 231 231 232 232 /* 233 * Turn off indexing of directory through Windows Indexing Service 233 * Turn off indexing of directory through Windows Indexing Service. 234 234 */ 235 235 if (fOpen & RTFILE_O_NOT_CONTENT_INDEXED) … … 264 264 265 265 /* 266 * Turn off indexing of directory through Windows Indexing Service 266 * Turn off indexing of directory through Windows Indexing Service. 267 267 */ 268 268 if (fOpen & RTFILE_O_NOT_CONTENT_INDEXED)
Note:
See TracChangeset
for help on using the changeset viewer.