diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2018-02-13 14:48:53 -0600 |
---|---|---|
committer | Adriana Kobylak <anoo@us.ibm.com> | 2018-02-13 15:41:27 -0600 |
commit | 596466b809154900dd12680724bd8827d9e7963c (patch) | |
tree | 7316a571305c36277944b8f22a4e591dfc94add0 /watch.cpp | |
parent | 2b2cd9f74e8e0158f93e3d4bb77346616c889698 (diff) | |
download | phosphor-bmc-code-mgmt-596466b809154900dd12680724bd8827d9e7963c.tar.gz phosphor-bmc-code-mgmt-596466b809154900dd12680724bd8827d9e7963c.zip |
Fix error logging
- The logging interfaces don't support std::string, so need to pass
c-strings to the metadata fields, or the pointer address will be
the one added to the log.
- Log the name of the file uploaded to the BMC instead of the
manifest path when there is a manifest error. The manifest path
is always /tmp/imgXXXX/MANIFEST which doesn't help debug.
- Check the status of the child process after waitpid returns. The
execl call returns when there was an error executing execl, not
if the command executed failed. This will catch when tar returns
a non-0 return code.
Change-Id: Ia4bd2666fc6beec28dee7e821d959a336800d282
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'watch.cpp')
-rw-r--r-- | watch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -104,7 +104,7 @@ int Watch::callback(sd_event_source* s, if (rc < 0) { log<level::ERR>("Error processing image", - entry("IMAGE=%s", tarballPath)); + entry("IMAGE=%s", tarballPath.c_str())); } } |