Only check for requisition on boards that are CfM-enabled.
BUG=b:158604816
TEST=compiled for fizz and eve, checked that IUSE flag was respected
Change-Id: Ifbc87e342c10c97bdb32522c5a4664b27e7a85f1
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2239007
Tested-by: Matthew Ziegelbaum <ziegs@chromium.org>
Commit-Queue: Matthew Ziegelbaum <ziegs@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/hardware_chromeos.cc b/hardware_chromeos.cc
index de1d7c0..916b2e5 100644
--- a/hardware_chromeos.cc
+++ b/hardware_chromeos.cc
@@ -81,7 +81,9 @@
const char* kActivePingKey = "first_active_omaha_ping_sent";
+#if USE_CFM
const char* kOemRequisitionKey = "oem_device_requisition";
+#endif
// Gets a string value from the vpd for a given key using the `vpd_get_value`
// shell command. Returns true on success.
@@ -216,7 +218,10 @@
string HardwareChromeOS::GetDeviceRequisition() const {
string requisition;
- return GetVpdValue(kOemRequisitionKey, &requisition) ? requisition : "";
+#if USE_CFM
+ GetVpdValue(kOemRequisitionKey, &requisition);
+#endif
+ return requisition;
}
int HardwareChromeOS::GetMinKernelKeyVersion() const {