Lines Matching refs:MTD
50 // A special 'filename' beginning with "MTD:" or "EMMC:" means to
52 if (strncmp(filename, "MTD:", 4) == 0 ||
121 // Load the contents of an MTD or EMMC partition into the provided
123 // "MTD:<partition_name>:<size_1>:<sha1_1>:<size_2>:<sha1_2>:..." (or
136 enum PartitionType { MTD, EMMC };
144 if (strcmp(magic, "MTD") == 0) {
145 type = MTD;
192 case MTD:
198 const MtdPartition* mtd = mtd_find_partition_by_name(partition);
199 if (mtd == NULL) {
200 printf("mtd partition \"%s\" not found (loading %s)\n",
205 ctx = mtd_read_partition(mtd);
207 printf("failed to initialize read of mtd partition \"%s\"\n",
239 case MTD:
284 case MTD:
357 // "MTD:<partition>[:...]" or "EMMC:<partition_device>:". Return 0 on
365 if (strcmp(magic, "MTD") == 0) {
366 type = MTD;
381 case MTD:
387 const MtdPartition* mtd = mtd_find_partition_by_name(partition);
388 if (mtd == NULL) {
389 printf("mtd partition \"%s\" not found for writing\n",
394 MtdWriteContext* ctx = mtd_write_partition(mtd);
396 printf("failed to init mtd partition \"%s\" for writing\n",
403 printf("only wrote %d of %d bytes to MTD %s\n",
410 printf("error finishing mtd write of %s\n", partition);
416 printf("error closing mtd write of %s\n", partition);
716 if (strncmp(target_filename, "MTD:", 4) == 0 ||
756 if (strncmp(source_filename, "MTD:", 4) == 0 ||
801 if (strncmp(target_filename, "MTD:", 4) == 0 ||