summaryrefslogtreecommitdiff
path: root/special-mode-mgr
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2019-06-07 23:36:37 +0300
committerBills, Jason M <jason.m.bills@intel.com>2019-06-24 23:03:28 +0300
commit1098003617be9ff89e30bf4248cf3fe2168e9138 (patch)
tree30deda8cf5d011558f33a4493f4cab6147574388 /special-mode-mgr
parent2c94bc2e81402ee9682e30a9326f947f2c4b2c72 (diff)
downloadprovingground-1098003617be9ff89e30bf4248cf3fe2168e9138.tar.xz
Get AC boot status directly from the command line
Instead of reading PFail as a DBus property, this change gets the AC boot status directly from the resetreason parameter on the command line. Change-Id: I1f8225c334e0c48c4b4feb1116f8fecd0fb3e49d Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'special-mode-mgr')
-rw-r--r--special-mode-mgr/src/specialmodemgr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/special-mode-mgr/src/specialmodemgr.cpp b/special-mode-mgr/src/specialmodemgr.cpp
index 968f503..3d8e559 100644
--- a/special-mode-mgr/src/specialmodemgr.cpp
+++ b/special-mode-mgr/src/specialmodemgr.cpp
@@ -52,7 +52,9 @@ SpecialModeMgr::SpecialModeMgr(
std::ifstream cmdLineIfs("/proc/cmdline");
getline(cmdLineIfs, cmdLineStr);
static constexpr const char* specialModeStr = "special=mfg";
- if (cmdLineStr.find(specialModeStr) != std::string::npos)
+ static constexpr const char* acBootStr = "resetreason=0x11";
+ if ((cmdLineStr.find(specialModeStr) != std::string::npos) &&
+ (cmdLineStr.find(acBootStr) != std::string::npos))
{
conn->async_method_call(
[this](boost::system::error_code ec, const VariantValue& mode) {