platform/msm_shared/partition_parser.c
unsigned int
write_mbr(unsigned size, unsigned char *mbrImage,
	  struct mmc_boot_host *mmc_host, struct mmc_boot_card *mmc_card)
{
	unsigned int ret;

	/* Verify that passed in block is a valid MBR */
	ret = partition_verify_mbr_signature(size, mbrImage);
	if (ret) {
		goto end;
	}

	/* Write the MBR/EBR to mmc */
	ret = write_mbr_in_blocks(size, mbrImage);
	if (ret) {
		dprintf(CRITICAL, "Failed to write MBR block to mmc.\n");
		goto end;
	}
	/* Re-read the MBR partition into mbr table */
	ret = mmc_boot_read_mbr(mmc_host, mmc_card);
	if (ret) {
		dprintf(CRITICAL, "Failed to re-read mbr partition.\n");
		goto end;
	}
	partition_dump();
 end:
	return ret;
}
/* Write the MBR/EBR to the MMC. */
Write the MBR/EBR to the MMC.
Write the MBR / EBR to the MMC .
unsigned int
write_mbr(unsigned size, unsigned char *mbrImage,
	  struct mmc_boot_host *mmc_host, struct mmc_boot_card *mmc_card)
{
	unsigned int ret;
	ret = partition_verify_mbr_signature(size, mbrImage);
	if (ret) {
		goto end;
	}
	ret = write_mbr_in_blocks(size, mbrImage);
	if (ret) {
		dprintf(CRITICAL, "Failed to write MBR block to mmc.\n");
		goto end;
	}
	ret = mmc_boot_read_mbr(mmc_host, mmc_card);
	if (ret) {
		dprintf(CRITICAL, "Failed to re-read mbr partition.\n");
		goto end;
	}
	partition_dump();
 end:
	return ret;
}
unsigned int write_mbr ( unsigned size , unsigned char * mbrImage , struct mmc_boot_host * mmc_host , struct mmc_boot_card * mmc_card ) { unsigned int ret ; ret = partition_verify_mbr_signature ( size , mbrImage ) ; if ( ret ) { goto end ; } ret = write_mbr_in_blocks ( size , mbrImage ) ; if ( ret ) { dprintf ( CRITICAL , " \n " ) ; goto end ; } ret = mmc_boot_read_mbr ( mmc_host , mmc_card ) ; if ( ret ) { dprintf ( CRITICAL , " \n " ) ; goto end ; } partition_dump ( ) ; end : return ret ; }
Write the MBR/EBR to the MMC.
Write the MBR / EBR to the MMC .
/* Verify that passed in block is a valid MBR */ /* Write the MBR/EBR to mmc */ /* Re-read the MBR partition into mbr table */