Lines Matching refs:toread
813 unsigned long toread = 0; in ptp_read_func() local
831 toread = size - curread; in ptp_read_func()
833 if (readzero && FLAG_NO_ZERO_READS(ptp_usb) && toread % 64 == 0) { in ptp_read_func()
834 toread += 1; in ptp_read_func()
840 toread = CONTEXT_BLOCK_SIZE_1; in ptp_read_func()
841 else if (toread == CONTEXT_BLOCK_SIZE_1) in ptp_read_func()
842 toread = CONTEXT_BLOCK_SIZE_2; in ptp_read_func()
843 else if (toread == CONTEXT_BLOCK_SIZE_2) in ptp_read_func()
844 toread = CONTEXT_BLOCK_SIZE_1; in ptp_read_func()
847 (unsigned int) toread, (unsigned int) (size-curread)); in ptp_read_func()
850 printf("Reading in 0x%04lx bytes\n", toread); in ptp_read_func()
852 result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptp_usb->timeout); in ptp_read_func()
871 if (expect_terminator_byte && result == toread) in ptp_read_func()
904 if (result < toread) /* short reads are common */ in ptp_read_func()