Home | History | Annotate | Download | only in src

Lines Matching refs:toread

815   unsigned long toread = 0;
833 toread = size - curread;
835 if (readzero && FLAG_NO_ZERO_READS(ptp_usb) && toread % 64 == 0) {
836 toread += 1;
842 toread = CONTEXT_BLOCK_SIZE_1;
843 else if (toread == CONTEXT_BLOCK_SIZE_1)
844 toread = CONTEXT_BLOCK_SIZE_2;
845 else if (toread == CONTEXT_BLOCK_SIZE_2)
846 toread = CONTEXT_BLOCK_SIZE_1;
848 printf("unexpected toread size 0x%04x, 0x%04x remaining bytes\n",
849 (unsigned int) toread, (unsigned int) (size-curread));
852 printf("Reading in 0x%04lx bytes\n", toread);
854 result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptp_usb->timeout);
873 if (expect_terminator_byte && result == toread)
906 if (result < toread) /* short reads are common */