futility/updater_archive.c
/*
 * Modifies a firmware image from patch information specified in model config.
 * Returns 0 on success, otherwise number of failures.
 */
Modifies a firmware image from patch information specified in model config.
Returns 0 on success, otherwise number of failures.
Modifies a firmware image from patch information specified in model config . Returns 0 on success otherwise number of failures .
int patch_image_by_model(
		struct firmware_image *image, const struct model_config *model,
		struct archive *archive)
{
	int err = 0;
	if (model->patches.rootkey)
		err += !!apply_key_file(
				image, model->patches.rootkey, archive,
				FMAP_RO_GBB, change_gbb_rootkey);
	if (model->patches.vblock_a)
		err += !!apply_key_file(
				image, model->patches.vblock_a, archive,
				FMAP_RW_VBLOCK_A, change_vblock);
	if (model->patches.vblock_b)
		err += !!apply_key_file(
				image, model->patches.vblock_b, archive,
				FMAP_RW_VBLOCK_B, change_vblock);
	return err;
}
int patch_image_by_model ( struct firmware_image * image , const struct model_config * model , struct archive * archive ) { int err = 0 ; if ( model -> patches . rootkey ) err += ! ! apply_key_file ( image , model -> patches . rootkey , archive , FMAP_RO_GBB , change_gbb_rootkey ) ; if ( model -> patches . vblock_a ) err += ! ! apply_key_file ( image , model -> patches . vblock_a , archive , FMAP_RW_VBLOCK_A , change_vblock ) ; if ( model -> patches . vblock_b ) err += ! ! apply_key_file ( image , model -> patches . vblock_b , archive , FMAP_RW_VBLOCK_B , change_vblock ) ; return err ; }
Modifies a firmware image from patch information specified in model config.
Modifies a firmware image from patch information specified in model config .