From 14d1b92e787261819bb56aff536d28ece3df2818 Mon Sep 17 00:00:00 2001 From: "seolheui, kim" Date: Fri, 28 Dec 2018 10:42:44 +0900 Subject: [PATCH] Fix improper use of log macros Change-Id: I70c48c06ddb7708874a998872ae89904ce61997c Signed-off-by: seolheui, kim --- server/internal-encryption.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/internal-encryption.cpp b/server/internal-encryption.cpp index af6758d..46b389b 100644 --- a/server/internal-encryption.cpp +++ b/server/internal-encryption.cpp @@ -114,7 +114,7 @@ bool JobWatch::waitForJob(const std::string& job) { return false;}); if (timeout) { - INFO(SINK, "job: " + job + ", result: time out"); + ERROR(SINK, "job: " + job + ", result: time out"); return false; } @@ -198,7 +198,7 @@ void stopSystemdUnits() "ListUnits", -1, "(a(ssssssouso))", "").get("(a(ssssssouso))", &iter); } catch (runtime::Exception &e) { - INFO(SINK, "Get list of systemd unit : " + std::string(e.what())); + ERROR(SINK, "Get list of systemd unit : " + std::string(e.what())); } while (1) { @@ -241,7 +241,7 @@ void stopSystemdUnits() auto unescapedName = getDecodedPath(unit, "/org/freedesktop/systemd1/unit/"); unitsToStop.insert(unescapedName); } catch (runtime::Exception &e) { - INFO(SINK, "Killing process: " + std::to_string(pid)); + ERROR(SINK, "Killing process: " + std::to_string(pid)); ::kill(pid, SIGKILL); } } @@ -410,7 +410,7 @@ int InternalEncryptionServer::migrateMasterKey(const std::string& dev, const std // encrypt the master key with given password return keyServer.changePassword2(dev, masterKey, password); } catch (const runtime::Exception&) { - INFO("Failed to load the master key stored during upgrade."); + ERROR(SINK, "Failed to load the master key stored during upgrade."); } return error::Unknown; @@ -422,7 +422,7 @@ int InternalEncryptionServer::setMountPassword(const std::string& password) // check if upgrade flag exists if (UpgradeSupport::checkUpgradeFlag()) { - INFO("Upgrade flag detected."); + INFO(SINK, "Upgrade flag detected."); int rc = migrateMasterKey(dev, password); if (rc != error::None) @@ -444,12 +444,12 @@ int InternalEncryptionServer::mount(const std::vector &mk, unsign mountKey.clear(); if (getState() != State::Encrypted) { - INFO(SINK, "Cannot mount, SD partition's state incorrect."); + ERROR(SINK, "Cannot mount, SD partition's state incorrect."); return error::NoSuchDevice; } if (engine->isMounted()) { - INFO(SINK, "Partition already mounted."); + ERROR(SINK, "Partition already mounted."); return error::None; } @@ -489,7 +489,7 @@ int InternalEncryptionServer::umount() } if (!engine->isMounted()) { - INFO(SINK, "Partition already umounted."); + ERROR(SINK, "Partition already umounted."); return error::None; } @@ -585,7 +585,7 @@ int InternalEncryptionServer::decrypt(const std::string& password) // check if key migration is needed if (UpgradeSupport::checkUpgradeFlag()) { - INFO("Upgrade flag detected."); + INFO(SINK, "Upgrade flag detected."); const std::string& dev = engine->getSource(); int rc = migrateMasterKey(dev, password); if (rc == error::None) -- 2.34.1