futility/updater_archive.c
/*
 * Applies white label information to an existing model configuration.
 * Collects signature ID information from either parameter signature_id or
 * image file (via VPD) and updates model.patches for key files.
 * Returns 0 on success, otherwise failure.
 */
Applies white label information to an existing model configuration.
Collects signature ID information from either parameter signature_id or
image file (via VPD) and updates model.patches for key files.
Returns 0 on success, otherwise failure.
Applies white label information to an existing model configuration . Collects signature ID information from either parameter signature_id or image file ( via VPD ) and updates model . patches for key files . Returns 0 on success otherwise failure .
int model_apply_white_label(
		struct model_config *model,
		struct archive *archive,
		const char *signature_id,
		const char *image)
{
	char *sig_id = NULL;
	int r = 0;
	if (!signature_id) {
		sig_id = resolve_signature_id(model, image);
		signature_id = sig_id;
	}
	if (signature_id) {
		VB2_DEBUG("Find white label patches by signature ID: '%s'.\n",
		      signature_id);
		find_patches_for_model(model, archive, signature_id);
	} else {
		signature_id = "";
		WARN("No VPD '%s' set for white label - use default keys.\n",
		     VPD_WHITELABEL_TAG);
	}
	if (!model->patches.rootkey) {
		ERROR("No keys found for signature_id: '%s'\n", signature_id);
		r = 1;
	} else {
		INFO("Applied for white label: %s\n", signature_id);
	}
	free(sig_id);
	return r;
}
int model_apply_white_label ( struct model_config * model , struct archive * archive , const char * signature_id , const char * image ) { char * sig_id = NULL ; int r = 0 ; if ( ! signature_id ) { sig_id = resolve_signature_id ( model , image ) ; signature_id = sig_id ; } if ( signature_id ) { VB2_DEBUG ( " \n " , signature_id ) ; find_patches_for_model ( model , archive , signature_id ) ; } else { signature_id = " " ; WARN ( " \n " , VPD_WHITELABEL_TAG ) ; } if ( ! model -> patches . rootkey ) { ERROR ( " \n " , signature_id ) ; r = 1 ; } else { INFO ( " \n " , signature_id ) ; } free ( sig_id ) ; return r ; }
Applies white label information to an existing model configuration.
Applies white label information to an existing model configuration .