summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastien baudouin <sebastien.baudouin@windriver.com>2015-04-16 13:26:27 +0200
committersebastien baudouin <sebastien.baudouin@windriver.com>2015-04-16 13:37:55 +0200
commitc8ce960bd2862b58d394d02b1d49f1d097665adf (patch)
tree0a4afd3f7f24ce268c4605b3604d22c4ff6224fc
parentf03f6810c1860a9dc945a2fb3e0f2921a855fa42 (diff)
downloadgenivi-demo-platform-hmi-c8ce960bd2862b58d394d02b1d49f1d097665adf.tar.gz
GDP-HMI: Change power off
For last User mode support we need to call a service at power off that will be in charge of: - calling node state manager for changing node status into shutding down - make sync for filesystem - call previous define unit poweroff.target
-rw-r--r--app/gdp-hmi-launcher2/gdp-hmi-launcher2.h2
-rw-r--r--src/gdp-dbus-service.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/gdp-hmi-launcher2/gdp-hmi-launcher2.h b/app/gdp-hmi-launcher2/gdp-hmi-launcher2.h
index f10b7ca..c2ebae7 100644
--- a/app/gdp-hmi-launcher2/gdp-hmi-launcher2.h
+++ b/app/gdp-hmi-launcher2/gdp-hmi-launcher2.h
@@ -58,7 +58,7 @@ public:
public slots:
void hmiRequestOffSlot() {
- QString unit = QStringLiteral("poweroff.target");
+ QString unit = QStringLiteral("PowerOff.service");
QString status = m_controller->Show(unit);
sd_journal_print(LOG_DEBUG,
"DEBUG: controller->Show(\"%s\") -> %s\n",
diff --git a/src/gdp-dbus-service.cpp b/src/gdp-dbus-service.cpp
index 7cda7c6..2c74951 100644
--- a/src/gdp-dbus-service.cpp
+++ b/src/gdp-dbus-service.cpp
@@ -50,10 +50,10 @@ int64_t HmiService::GetId()
std::string HmiService::Show(const std::string &unit)
{
- if (0 == unit.compare(0, 15, "poweroff.target")) {
+ if (0 == unit.compare(0, 16, "PowerOff.service")) {
sd_journal_print(LOG_DEBUG, "HmiService::Show() - %s (match)\n",
unit.c_str());
- std::string path = gSystemd->StartUnit(unit, "replace");
+ std::string path = gSystemdSession->StartUnit(unit, "replace");
} else {
sd_journal_print(LOG_DEBUG, "HmiService::Show() - %s\n",
unit.c_str());