diff options
author | Felipe Leme <felipeal@google.com> | 2016-11-28 09:42:12 -0800 |
---|---|---|
committer | Felipe Leme <felipeal@google.com> | 2016-11-28 13:44:30 -0800 |
commit | 6a276ba8421e8fc881cd32b7a3de3cb30900e4cb (patch) | |
tree | d5b8830073669f3805fba94920cfd9b2141f83aa /dumpstate/1.0/default | |
parent | acdce90fdd39298ff94d9fdc238865eae72ebd5a (diff) | |
download | platform_hardware_interfaces-6a276ba8421e8fc881cd32b7a3de3cb30900e4cb.tar.gz platform_hardware_interfaces-6a276ba8421e8fc881cd32b7a3de3cb30900e4cb.tar.bz2 platform_hardware_interfaces-6a276ba8421e8fc881cd32b7a3de3cb30900e4cb.zip |
Passing title to libdumpstateutil functions.
BUG: 31982882
Test: built and ran it
Change-Id: Icf09ca272b072c78794855157f13be8cafdb6a47
Diffstat (limited to 'dumpstate/1.0/default')
-rw-r--r-- | dumpstate/1.0/default/DumpstateDevice.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/dumpstate/1.0/default/DumpstateDevice.cpp b/dumpstate/1.0/default/DumpstateDevice.cpp index a279b89525..42642355bc 100644 --- a/dumpstate/1.0/default/DumpstateDevice.cpp +++ b/dumpstate/1.0/default/DumpstateDevice.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #define LOG_TAG "dumpstate" #include "DumpstateDevice.h" @@ -28,11 +44,9 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) { ALOGI("Dumpstate HIDL not provided by device\n"); dprintf(fd, "Dumpstate HIDL not provided by device; providing bogus data.\n"); - // Shows some examples on how to use the libdumpstateutils API. - dprintf(fd, "Time now is: "); - RunCommandToFd(fd, {"/system/bin/date"}); - dprintf(fd, "Contents of a small file (/system/etc/hosts):\n"); - DumpFileToFd(fd, "/system/etc/hosts"); + // Shows some examples on how to use the libdumpstateutil API. + RunCommandToFd(fd, "DATE", {"/system/bin/date"}); + DumpFileToFd(fd, "HOSTS", "/system/etc/hosts"); return Void(); } |