diff options
| author | Tom Cherry <tomcherry@google.com> | 2020-06-10 09:29:25 -0700 |
|---|---|---|
| committer | Tom Cherry <tomcherry@google.com> | 2020-06-10 09:29:25 -0700 |
| commit | 2217c50a4fd46567e27ed6073d153ee478a099c2 (patch) | |
| tree | 21aac72a74c8c3fd37a7c7ffa1c8ee3fa8cc6b66 /base/errors_unix.cpp | |
| parent | 71de690f602f8c491024b9eef8022298aac9de52 (diff) | |
fastboot: don't print anything in Status() if the input is empty
Status() is called with an empty string to handle `fastboot oem`
commands. This currently emits a set of spaces and sets
last_start_time such that the epilog can track the time spent in this
command. Emitting the spaces is problematic however, since it results
in the follow:
$ fastboot oem device-info
(bootloader) Verity mode: false
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
OKAY [ 0.000s]
Finished. Total time: 0.000s
If we skip emitting the spaces, then we get the correct result:
$ fastboot oem device-info
(bootloader) Verity mode: false
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: true
(bootloader) Charger screen enabled: true
OKAY [ 0.001s]
Finished. Total time: 0.001s
There are no other uses of Status() with an empty string, so this
changes won't impact other commands.
Bug: 158310284
Test: fastboot formats this and other commands correctly.
Change-Id: I6294acefc65a8399160c0944b3fbc2f2ace919ed
Diffstat (limited to 'base/errors_unix.cpp')
0 files changed, 0 insertions, 0 deletions
