futility: updater: rename 'customlabel_tag' to 'custom_label_tag'

Per discussion, the 'custom_label_tag' is easier to read than
'customlabel_tag'. We should rename it before any real devices
have started using the different names.

BUG=b:169766857
TEST=make; build and run test
BRANCH=None

Change-Id: I3672e7b20bc85f79796470ba1a58c2896d26ff88
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3534491
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
diff --git a/futility/updater.c b/futility/updater.c
index e6834a9..c1ac58a 100644
--- a/futility/updater.c
+++ b/futility/updater.c
@@ -1546,7 +1546,7 @@
 		if (!model->patches.rootkey) {
 			if (is_factory ||
 			    is_write_protection_enabled(cfg) ||
-			    get_config_quirk(QUIRK_ALLOW_EMPTY_CUSTOMLABEL_TAG,
+			    get_config_quirk(QUIRK_ALLOW_EMPTY_CUSTOM_LABEL_TAG,
 					     cfg)) {
 				WARN("No VPD for custom label.\n");
 			} else {
diff --git a/futility/updater.h b/futility/updater.h
index 4e10fc7..30a96a3 100644
--- a/futility/updater.h
+++ b/futility/updater.h
@@ -42,7 +42,7 @@
 	QUIRK_UNLOCK_ME_FOR_UPDATE,
 	QUIRK_UNLOCK_WILCO_ME_FOR_UPDATE,
 	QUIRK_EVE_SMM_STORE,
-	QUIRK_ALLOW_EMPTY_CUSTOMLABEL_TAG,
+	QUIRK_ALLOW_EMPTY_CUSTOM_LABEL_TAG,
 	QUIRK_EC_PARTIAL_RECOVERY,
 	QUIRK_OVERRIDE_SIGNATURE_ID,
 	QUIRK_PRESERVE_ME,
diff --git a/futility/updater_archive.c b/futility/updater_archive.c
index fb91722..1d916db 100644
--- a/futility/updater_archive.c
+++ b/futility/updater_archive.c
@@ -53,7 +53,7 @@
  *  - rootkey.$CLTAG
  *  - vblock_A.$CLTAG
  *  - vblock_B.$CLTAG
- * The $CLTAG should come from VPD value 'customlabel_tag'. For legacy devices,
+ * The $CLTAG should come from VPD value 'custom_label_tag'. For legacy devices,
  * the VPD name may be 'whitelabel_tag', or 'customization_id'.
  * The 'customization_id' has a different format: LOEM[-VARIANT] and we can only
  * take LOEM as $CLTAG, for example A-B => $CLTAG=A.
@@ -69,7 +69,7 @@
  *  - vblock_A.$SIGID
  *  - vblock_B.$SIGID
  * If $SIGID starts with 'sig-id-in-*' then we have to replace it by VPD value
- * 'customlabel_tag' as '$MODEL-$CLTAG'.
+ * 'custom_label_tag' as '$MODEL-$CLTAG'.
  */
 
 static const char * const SETVARS_IMAGE_MAIN = "IMAGE_MAIN",
@@ -80,8 +80,8 @@
 		  * const DIR_KEYSET = "keyset",
 		  * const DIR_MODELS = "models",
 		  * const DEFAULT_MODEL_NAME = "default",
-		  * const VPD_CUSTOMLABEL_TAG = "customlabel_tag",
-		  * const VPD_CUSTOMLABEL_TAG_LEGACY = "whitelabel_tag",
+		  * const VPD_CUSTOM_LABEL_TAG = "custom_label_tag",
+		  * const VPD_CUSTOM_LABEL_TAG_LEGACY = "whitelabel_tag",
 		  * const VPD_CUSTOMIZATION_ID = "customization_id",
 		  * const ENV_VAR_MODEL_DIR = "${MODEL_DIR}",
 		  * const PATH_STARTSWITH_KEYSET = "keyset/",
@@ -918,18 +918,18 @@
 static char *resolve_signature_id(struct model_config *model, const char *image)
 {
 	int is_unibuild = model->signature_id ? 1 : 0;
-	char *tag = vpd_get_value(image, VPD_CUSTOMLABEL_TAG);
+	char *tag = vpd_get_value(image, VPD_CUSTOM_LABEL_TAG);
 	char *sig_id = NULL;
 
 	if (tag == NULL)
-		tag = vpd_get_value(image, VPD_CUSTOMLABEL_TAG_LEGACY);
+		tag = vpd_get_value(image, VPD_CUSTOM_LABEL_TAG_LEGACY);
 
 	/* Unified build: $model.$tag, or $model (b/126800200). */
 	if (is_unibuild) {
 		if (!tag) {
 			WARN("No VPD '%s' set for custom label. "
 			     "Use model name '%s' as default.\n",
-			     VPD_CUSTOMLABEL_TAG, model->name);
+			     VPD_CUSTOM_LABEL_TAG, model->name);
 			return strdup(model->name);
 		}
 
@@ -981,7 +981,7 @@
 	} else {
 		signature_id = "";
 		WARN("No VPD '%s' set for custom label - use default keys.\n",
-		     VPD_CUSTOMLABEL_TAG);
+		     VPD_CUSTOM_LABEL_TAG);
 	}
 	if (!model->patches.rootkey) {
 		ERROR("No keys found for signature_id: '%s'\n", signature_id);
diff --git a/futility/updater_quirks.c b/futility/updater_quirks.c
index 7a135b8..8d6114b 100644
--- a/futility/updater_quirks.c
+++ b/futility/updater_quirks.c
@@ -57,20 +57,20 @@
 	{ .match = "Google_Trogdor.", .quirks = "min_platform_version=2" },
 
         /* Legacy custom label units. */
-	{ .match = "Google_Hana.", .quirks = "allow_empty_customlabel_tag" },
-	{ .match = "Google_Reks.", .quirks = "allow_empty_customlabel_tag" },
-	{ .match = "Google_Relm.", .quirks = "allow_empty_customlabel_tag" },
-	{ .match = "Google_Wizpig.", .quirks = "allow_empty_customlabel_tag" },
+	{ .match = "Google_Hana.", .quirks = "allow_empty_custom_label_tag" },
+	{ .match = "Google_Reks.", .quirks = "allow_empty_custom_label_tag" },
+	{ .match = "Google_Relm.", .quirks = "allow_empty_custom_label_tag" },
+	{ .match = "Google_Wizpig.", .quirks = "allow_empty_custom_label_tag" },
 	{ .match = "Google_Enguarde.",
-		.quirks = "allow_empty_customlabel_tag" },
+		.quirks = "allow_empty_custom_label_tag" },
 	{ .match = "Google_Expresso.",
-		.quirks = "allow_empty_customlabel_tag" },
+		.quirks = "allow_empty_custom_label_tag" },
 	{ .match = "Google_Veyron_Jaq.",
-		.quirks = "allow_empty_customlabel_tag" },
+		.quirks = "allow_empty_custom_label_tag" },
 	{ .match = "Google_Veyron_Jerry.",
-		.quirks = "allow_empty_customlabel_tag" },
+		.quirks = "allow_empty_custom_label_tag" },
 	{ .match = "Google_Veyron_Mighty.",
-		.quirks = "allow_empty_customlabel_tag" },
+		.quirks = "allow_empty_custom_label_tag" },
 
 	{ .match = "Google_Phaser.", .quirks = "override_signature_id" },
 };
@@ -484,8 +484,8 @@
 		       "dedicated FMAP section.";
 	quirks->apply = quirk_eve_smm_store;
 
-	quirks = &cfg->quirks[QUIRK_ALLOW_EMPTY_CUSTOMLABEL_TAG];
-	quirks->name = "allow_empty_customlabel_tag";
+	quirks = &cfg->quirks[QUIRK_ALLOW_EMPTY_CUSTOM_LABEL_TAG];
+	quirks->name = "allow_empty_custom_label_tag";
 	quirks->help = "chromium/906962; allow devices without custom label "
 		       "tags set to use default keys.";
 	quirks->apply = NULL;  /* Simple config. */
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 8b24742..e6360c3 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -371,7 +371,7 @@
 	--quirks preserve_me \
 	-i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1
 
-# Test archive and manifest. CL_TAG is for customlabel_tag.
+# Test archive and manifest. CL_TAG is for custom_label_tag.
 A="${TMP}.archive"
 mkdir -p "${A}/bin"
 echo 'echo "${CL_TAG}"' >"${A}/bin/vpd"
@@ -418,7 +418,7 @@
 test_update "Full update (--archive, custom label, no VPD - quirk mode)" \
 	"${LINK_BIOS}" "${A}/image.bin" \
 	-a "${A}" --wp=0 --sys_props 0,0x10001,1,3 \
-	--quirks=allow_empty_customlabel_tag
+	--quirks=allow_empty_custom_label_tag
 
 test_update "Full update (--archive, custom label, single package)" \
 	"${A}/image.bin" "${LINK_BIOS}" \