Changeset 4372 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Aug 24, 2007 9:21:51 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23921
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/fileio.cpp
r4071 r4372 154 154 * If NULL an error will be returned for a partial read. 155 155 */ 156 RTR3DECL(int) RTFileReadAt(RTFILE File, RTFOFF off, void *pvBuf, unsigned cbToRead, unsigned*pcbRead)156 RTR3DECL(int) RTFileReadAt(RTFILE File, RTFOFF off, void *pvBuf, size_t cbToRead, size_t *pcbRead) 157 157 { 158 158 int rc = RTFileSeek(File, off, RTFILE_SEEK_BEGIN, NULL); … … 175 175 * If NULL an error will be returned for a partial write. 176 176 */ 177 RTR3DECL(int) RTFileWriteAt(RTFILE File, RTFOFF off, const void *pvBuf, unsigned cbToWrite, unsigned*pcbWritten)177 RTR3DECL(int) RTFileWriteAt(RTFILE File, RTFOFF off, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten) 178 178 { 179 179 int rc = RTFileSeek(File, off, RTFILE_SEEK_BEGIN, NULL); -
trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp
r4071 r4372 254 254 255 255 256 RTR3DECL(int) RTFileRead(RTFILE File, void *pvBuf, unsigned cbToRead, unsigned*pcbRead)256 RTR3DECL(int) RTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, size_t *pcbRead) 257 257 { 258 258 if (cbToRead <= 0) … … 278 278 if (cbReadPart == 0) 279 279 return VERR_EOF; 280 else 281 return RTErrConvertFromErrno(errno); 280 return RTErrConvertFromErrno(errno); 282 281 } 283 282 cbRead += cbReadPart; … … 291 290 292 291 293 RTR3DECL(int) RTFileWrite(RTFILE File, const void *pvBuf, unsigned cbToWrite, unsigned*pcbWritten)292 RTR3DECL(int) RTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten) 294 293 { 295 294 if (cbToWrite <= 0) -
trunk/src/VBox/Runtime/r3/win32/fileio-win32.cpp
r4071 r4372 284 284 285 285 286 RTR3DECL(int) RTFileRead(RTFILE File, void *pvBuf, unsigned cbToRead, unsigned*pcbRead)286 RTR3DECL(int) RTFileRead(RTFILE File, void *pvBuf, size_t cbToRead, size_t *pcbRead) 287 287 { 288 288 if (cbToRead <= 0) … … 314 314 315 315 316 RTR3DECL(int) RTFileWrite(RTFILE File, const void *pvBuf, unsigned cbToWrite, unsigned*pcbWritten)316 RTR3DECL(int) RTFileWrite(RTFILE File, const void *pvBuf, size_t cbToWrite, size_t *pcbWritten) 317 317 { 318 318 if (cbToWrite <= 0) -
trunk/src/VBox/Runtime/testcase/tstFile.cpp
r4071 r4372 75 75 } 76 76 static const char szTestBuf[] = "Sausages and bacon for breakfast again!"; 77 unsignedcbWritten = 0;77 size_t cbWritten = 0; 78 78 while (cbWritten < sizeof(szTestBuf)) 79 79 { 80 unsignedcbWrittenPart;80 size_t cbWrittenPart; 81 81 rc = RTFileWrite(File, &szTestBuf[cbWritten], sizeof(szTestBuf) - cbWritten, &cbWrittenPart); 82 82 if (RT_FAILURE(rc)) … … 101 101 { 102 102 char szReadBuf[sizeof(szTestBuf)]; 103 unsignedcbRead = 0;103 size_t cbRead = 0; 104 104 while (cbRead < sizeof(szTestBuf)) 105 105 { 106 unsignedcbReadPart;106 size_t cbReadPart; 107 107 rc = RTFileRead(File, &szReadBuf[cbRead], sizeof(szTestBuf) - cbRead, &cbReadPart); 108 108 if (RT_FAILURE(rc)) … … 147 147 else 148 148 { 149 unsignedcbWritten = 0;149 size_t cbWritten = 0; 150 150 while (cbWritten < sizeof(szTestBuf)) 151 151 { 152 unsignedcbWrittenPart;152 size_t cbWrittenPart; 153 153 rc = RTFileWrite(File, &szTestBuf[cbWritten], sizeof(szTestBuf) - cbWritten, &cbWrittenPart); 154 154 if (RT_FAILURE(rc)) … … 172 172 { 173 173 char szReadBuf[sizeof(szTestBuf)]; 174 unsignedcbRead = 0;174 size_t cbRead = 0; 175 175 while (cbRead < sizeof(szTestBuf)) 176 176 { 177 unsignedcbReadPart;177 size_t cbReadPart; 178 178 rc = RTFileRead(File, &szReadBuf[cbRead], sizeof(szTestBuf) - cbRead, &cbReadPart); 179 179 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.