AU: Use crossystem hwid to obtain the hardware class.
This is more portable than reading the HWID from the ACPI file and should work
on ARM.
BUG=chromium-os:15255
TEST=unit tests, ran AU on Cr-48, checked the Omaha update check request
Change-Id: I8a2750140da7da99c217a6976f46b1b226696276
Reviewed-on: http://gerrit.chromium.org/gerrit/1078
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
diff --git a/utils.h b/utils.h
index fb30055..7b39cd4 100644
--- a/utils.h
+++ b/utils.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -33,6 +33,9 @@
// boot mode. Returns false if the boot mode is developer.
bool IsNormalBootMode();
+// Returns the HWID or an empty string on error.
+std::string GetHardwareClass();
+
// Writes the data passed to path. The file at path will be overwritten if it
// exists. Returns true on success, false otherwise.
bool WriteFile(const char* path, const char* data, int data_len);