blob: 9e64b8378cb0d179d88ea4b75208c889d63f7d6e [file] [log] [blame]
// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "biod/biod_system.h"
extern "C" {
// Use libvboot_host for accessing crossystem variables.
#include <vboot/crossystem.h>
}
namespace {
constexpr char kHardwareWriteProtect[] = "wpsw_cur";
}
namespace biod {
bool BiodSystem::HardwareWriteProtectIsEnabled() const {
return VbGetSystemPropertyInt(kHardwareWriteProtect) != 0;
}
int BiodSystem::VbGetSystemPropertyInt(const std::string& name) const {
return ::VbGetSystemPropertyInt(name.c_str());
}
} // namespace biod