diff options
author | Yifan Hong <elsk@google.com> | 2019-03-28 14:05:29 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-28 14:05:29 -0700 |
commit | 00c0df0574560d565d90f9a21f659ad12b57fe48 (patch) | |
tree | 8260175f26805a1dbf6d53e9ee8727bf867c2cb5 | |
parent | 07bcf1a5c3e29564047de2b0d72b2c80cebb0176 (diff) | |
parent | 8d6d2c44f942467679f0e098c9b26902c4c00f19 (diff) | |
download | extras-00c0df0574560d565d90f9a21f659ad12b57fe48.tar.gz |
Merge "lpdump: log warning message." am: 8162690b3f
am: 8d6d2c44f9
Change-Id: If40f4d783ec223395cc1ea6d07c6914fb37401ef
-rw-r--r-- | partition_tools/lpdumpd.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/partition_tools/lpdumpd.cc b/partition_tools/lpdumpd.cc index 83ec60ed..6110f337 100644 --- a/partition_tools/lpdumpd.cc +++ b/partition_tools/lpdumpd.cc @@ -50,12 +50,17 @@ class Lpdump : public BnLpdump { } LOG(DEBUG) << "Dumping with args: " << base::Join(args, " "); std::stringstream output; - int ret = LpdumpMain((int)m_args.size(), argv, output, output); + std::stringstream error; + int ret = LpdumpMain((int)m_args.size(), argv, output, error); + std::string error_str = error.str(); if (ret == 0) { + if (!error_str.empty()) { + LOG(WARNING) << error_str; + } *aidl_return = output.str(); return Status::ok(); } else { - return Status::fromServiceSpecificError(ret, output.str().c_str()); + return Status::fromServiceSpecificError(ret, error_str.c_str()); } } }; |