cgpt/cgpt_find.c
// This handles the MTD devices. ChromeOS uses /dev/mtdX for kernel partitions,
// /dev/ubiblockX_0 for root partitions, and /dev/ubiX for stateful partition.
This handles the MTD devices.
This handles the MTD devices .
static void chromeos_mtd_show(CgptFindParams *params, const char *filename,
                              int partnum, GptEntry *entry) {
  if (GuidEqual(&guid_chromeos_kernel, &entry->type)) {
    printf("/dev/mtd%d\n", partnum);
  } else if (GuidEqual(&guid_chromeos_rootfs, &entry->type)) {
    printf("/dev/ubiblock%d_0\n", partnum);
  } else {
    printf("/dev/ubi%d_0\n", partnum);
  }
}
static void chromeos_mtd_show ( CgptFindParams * params , const char * filename , int partnum , GptEntry * entry ) { if ( GuidEqual ( & guid_chromeos_kernel , & entry -> type ) ) { printf ( " \n " , partnum ) ; } else if ( GuidEqual ( & guid_chromeos_rootfs , & entry -> type ) ) { printf ( " \n " , partnum ) ; } else { printf ( " \n " , partnum ) ; } }
This handles the MTD devices.
This handles the MTD devices .