int mount_partition(const char *partition, const char *mount_point, const char *filesystem, int read_only) { int type = detect_partition(NULL, partition); switch (type) { case MTD: return cmd_mtd_mount_partition(partition, mount_point, filesystem, read_only); case MMC: return cmd_mmc_mount_partition(partition, mount_point, filesystem, read_only); case BML: return cmd_bml_mount_partition(partition, mount_point, filesystem, read_only); default: return -1; } }
int main() { printf ("Mounting /system partition to /cm/system\n"); cmd_mtd_mount_partition("system", "/cm/system", "yaffs2", 0); return 0; }