Searched refs:toRead (Results 1 - 25 of 39) sorted by relevance

12

/haiku/src/kits/shared/
H A DAttributeUtilities.cpp41 size_t toRead = kCopyBufferSize; local
42 if ((off_t)toRead > bytesLeft)
43 toRead = bytesLeft;
47 offset, buffer, toRead);
/haiku/src/tests/system/kernel/file_corruption/fs/
H A DSymLink.cpp40 SymLink::ReadSymLink(char* buffer, size_t toRead, size_t& _bytesRead) argument
46 if (toRead > size)
47 toRead = size;
49 if (toRead == 0) {
60 memcpy(buffer, data, toRead);
62 _bytesRead = toRead;
H A DSymLink.h19 status_t ReadSymLink(char* buffer, size_t toRead,
/haiku/src/tests/system/libroot/posix/
H A Dseek_and_write_test.cpp20 size_t toRead = std::min(length, sizeof(buffer)); local
22 if (pread(fd, buffer, toRead, start) != (ssize_t)toRead) {
27 if (memcmp(contents, buffer, toRead)) {
32 contents += toRead;
33 start += toRead;
34 length -= toRead;
/haiku/src/kits/debugger/model/
H A DTeamMemory.cpp29 size_t toRead = std::min(maxLength, local
31 ssize_t bytesRead = ReadMemory(address, buffer, toRead);
/haiku/src/add-ons/kernel/file_systems/packagefs/nodes/
H A DUnpackingAttributeCookie.cpp39 size_t toRead = std::min((uint64)*bufferSize,
43 if (toRead > 0) {
44 status_t error = reader->ReadData(offset, buffer, toRead);
49 *bufferSize = toRead;
164 size_t toRead; local
166 attribute->Type(), attribute->Data().UncompressedSize(), data, toRead);
171 if (toRead > 0) {
181 error = ReadAttribute(packageNode, attribute, 0, data, &toRead);
/haiku/src/bin/debug/strace/
H A DMemoryReader.cpp58 int32 toRead = size; local
59 if (toRead > B_MAX_READ_WRITE_MEMORY_SIZE)
60 toRead = B_MAX_READ_WRITE_MEMORY_SIZE;
63 status_t error = _Read(address, buffer, toRead, actuallyRead);
/haiku/src/kits/package/hpkg/
H A DPackageFileHeapReader.cpp103 size_t toRead = std::min(remainingChunks, kChunkSize / 2); local
104 status_t error = ReadFileData(offset, buffer, toRead * 2);
108 if (!fOffsets.InitChunksOffsets(chunkCount, index, buffer, toRead))
111 remainingChunks -= toRead;
112 index += toRead;
113 offset += toRead * 2;
/haiku/src/add-ons/translators/shared/
H A DStreamBuffer.h19 StreamBuffer(BPositionIO *stream, size_t bufferSize, bool toRead = true);
H A DStreamBuffer.cpp41 StreamBuffer::StreamBuffer(BPositionIO *pstream, size_t nbuffersize, bool toRead) argument
48 fToRead = toRead;
/haiku/src/kits/translation/
H A DBitmapStream.cpp75 ssize_t toRead;
79 toRead = sizeof(TranslatorBitmap) - pos;
82 toRead = fSize - pos;
86 if (toRead > (ssize_t)size)
87 toRead = (ssize_t)size;
89 memcpy(buffer, source, toRead);
90 return toRead;
/haiku/src/add-ons/kernel/partitioning_systems/intel/
H A DPartitionMapParser.cpp297 int32 toRead = sizeof(partition_table); local
300 if (offset < 0 || offset + toRead > fSessionSize) {
310 table, toRead);
311 if (bytesRead != (ssize_t)toRead) {
319 toRead = kGPTSignatureSize;
322 + sizeof(partition_table), &gptSignature, toRead);
323 if (bytesRead != (ssize_t)toRead) {
/haiku/src/tests/add-ons/kernel/drivers/tty/
H A Dtty-test.cpp343 int32 toRead = sizeof(buffer); local
344 if (toRead > size)
345 toRead = size;
347 bytesRead = read(fd, buffer, toRead);
839 int toRead = -1; local
856 err = ioctl(fd, FIONREAD, &toRead);
859 //CHK(toRead == 0);
865 err = ioctl(fd, FIONREAD, &toRead);
868 CHK(toRead == 1);
872 err = ioctl(fd, FIONREAD, &toRead);
[all...]
/haiku/src/add-ons/kernel/file_systems/packagefs/package/
H A DPackageFile.cpp104 size_t toRead = std::min((uint64)size, local
107 if (toRead > 0) {
111 status_t error = fReader->ReadDataToOutput(offset, toRead, &output);
/haiku/src/kits/debugger/elf/
H A DElfSymbolLookup.cpp92 size_t toRead = std::min(size, local
94 memcpy(buffer, fBuffer[i] + (address - fAddress[i]), toRead);
95 fHitEnd[i] = address + toRead == fAddress[i] + fCachedSize[i];
96 return toRead;
280 size_t toRead = std::min(size, sizeof(buffer)); local
281 ssize_t bytesRead = fSource->Read(address, buffer, toRead);
/haiku/src/system/boot/loader/file_systems/amiga_ffs/
H A DFile.cpp139 int32 toRead = fNode.BlockSize() - blockOffset; local
140 if (toRead > bytesLeft)
141 toRead = bytesLeft;
144 buffer, toRead);
/haiku/src/kits/package/hpkg/v1/
H A DPackageDataReaderV1.cpp120 size_t toRead = std::min(size, buffer->Size()); local
122 buffer->Buffer(), toRead);
127 error = output->WriteExactly(buffer->Buffer(), toRead);
131 offset += toRead;
132 size -= toRead;
/haiku/src/system/kernel/debug/
H A DBreakpointManager.cpp661 int32 toRead = size; local
663 if (toRead > maxRead)
664 toRead = maxRead;
666 error = user_memcpy(buffer, address, toRead);
670 bytesRead += toRead;
671 address += toRead;
672 buffer += toRead;
673 size -= toRead;
/haiku/src/add-ons/kernel/file_systems/reiserfs/
H A DIterators.cpp1340 off_t toRead = min_c(fItemSize - inItemOffset, (off_t)bufferSize); local
1343 error = _ReadIndirectItem(inItemOffset, buffer, toRead);
1346 error = _ReadDirectItem(inItemOffset, buffer, toRead);
1358 buffer = (uint8*)buffer + toRead;
1359 position += toRead;
1360 bufferSize -= toRead;
1361 bytesRead += toRead;
1524 uint32 toRead = min_c(fBlockSize - localOffset, bufferSize); local
1527 toRead);
1530 bufferSize -= toRead;
[all...]
/haiku/src/bin/
H A Dcopyattr.cpp224 size_t toRead = kCopyBufferSize; local
225 if ((off_t)toRead > bytesLeft)
226 toRead = bytesLeft;
230 offset, buffer, toRead);
/haiku/src/kits/storage/
H A DCopyEngine.cpp415 size_t toRead = fBufferSize; local
416 if ((off_t)toRead > bytesLeft)
417 toRead = bytesLeft;
421 offset, fBuffer, toRead);
/haiku/src/system/boot/loader/net/
H A DRemoteDisk.cpp120 uint32 toRead = min_c(bufferSize, REMOTE_DISK_BLOCK_SIZE); local
121 request.size = htons(toRead);
/haiku/src/tests/add-ons/kernel/file_systems/random_file_actions/
H A Drandom_file_actions.cpp422 ssize_t toRead = min_c(size, kBlockSize); local
423 ssize_t bytesRead = read(fd, block, toRead);
424 if (bytesRead != toRead) {
439 offset += toRead;
440 size -= toRead;
/haiku/src/system/boot/loader/file_systems/tarfs/
H A Dtarfs.cpp277 size_t toRead = fSize - pos;
278 if (toRead > bufferSize)
279 toRead = bufferSize;
281 memcpy(buffer, (char*)fHeader + BLOCK_SIZE + pos, toRead);
283 return toRead;
/haiku/src/apps/terminal/
H A DTermParse.cpp1322 int32 toRead = atomic_get(&fReadBufferSize); local
1323 if (toRead > ESC_PARSER_BUFFER_SIZE)
1324 toRead = ESC_PARSER_BUFFER_SIZE;
1326 for (int32 i = 0; i < toRead; i++) {
1333 int32 bufferSize = atomic_add(&fReadBufferSize, -toRead);
1338 && bufferSize - toRead <= READ_BUF_SIZE - MIN_PTY_BUFFER_SPACE) {
1342 fParserBufferSize = toRead;

Completed in 258 milliseconds

12