Home | History | Annotate | Download | only in mtdutils

Lines Matching defs:wrote

460                 printf("mtd: wrote block after %d retries\n", retry);
462 printf("mtd: successfully wrote block at %lx\n", pos);
480 size_t wrote = 0;
481 while (wrote < len) {
483 if (ctx->stored > 0 || len - wrote < ctx->partition->erase_size) {
485 size_t copy = len - wrote < avail ? len - wrote : avail;
486 memcpy(ctx->buffer + ctx->stored, data + wrote, copy);
488 wrote += copy;
498 while (ctx->stored == 0 && len - wrote >= ctx->partition->erase_size) {
499 if (write_block(ctx, data + wrote)) return -1;
500 wrote += ctx->partition->erase_size;
504 return wrote;