12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "update_engine/common/hwid_override.h"
- #include <map>
- #include <string>
- #include <base/files/file_path.h>
- #include <base/files/file_util.h>
- #include <brillo/key_value_store.h>
- using std::map;
- using std::string;
- namespace chromeos_update_engine {
- const char HwidOverride::kHwidOverrideKey[] = "HWID_OVERRIDE";
- HwidOverride::HwidOverride() {}
- HwidOverride::~HwidOverride() {}
- string HwidOverride::Read(const base::FilePath& root) {
- brillo::KeyValueStore lsb_release;
- lsb_release.Load(base::FilePath(root.value() + "/etc/lsb-release"));
- string result;
- if (lsb_release.GetString(kHwidOverrideKey, &result))
- return result;
- return "";
- }
- }
|