Fix improper use of log macros 74/196374/5
authorseolheui, kim <s414.kim@samsung.com>
Fri, 28 Dec 2018 01:42:44 +0000 (10:42 +0900)
committerseolheui, kim <s414.kim@samsung.com>
Fri, 28 Dec 2018 05:51:30 +0000 (14:51 +0900)
Change-Id: I70c48c06ddb7708874a998872ae89904ce61997c
Signed-off-by: seolheui, kim <s414.kim@samsung.com>
server/internal-encryption.cpp

index af6758d..46b389b 100644 (file)
@@ -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<unsigned char> &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)