diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2017-02-18 17:06:10 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2017-03-11 15:41:48 +0100 |
commit | e3d88377463f4706372ae7fd6c85937f6035b5ef (patch) | |
tree | 1186700345945c4a7eb447f54fcccefdc71c6c9d /include | |
parent | e8f6df836522250b9a9d4052722fb9780683058b (diff) | |
download | libnitrokey-e3d88377463f4706372ae7fd6c85937f6035b5ef.tar.gz libnitrokey-e3d88377463f4706372ae7fd6c85937f6035b5ef.tar.bz2 |
Show Storage status only on matching command code
Should not show on commands where it is not supplied
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/dissect.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dissect.h b/include/dissect.h index 8c975c5..8992c56 100644 --- a/include/dissect.h +++ b/include/dissect.h @@ -98,7 +98,8 @@ class ResponseDissector : semantics::non_constructible { out << "CRC:\t" << std::hex << std::setw(2) << std::setfill('0') << pod.crc << std::endl; - out << "Storage stick status:" << std::endl; + if((int)pod.command_id == pod.storage_status.command_id){ + out << "Storage stick status (where applicable):" << std::endl; #define d(x) out << " "#x": \t"<< std::hex << std::setw(2) \ << std::setfill('0')<< static_cast<int>(x) << std::endl; d(pod.storage_status.command_counter); @@ -106,6 +107,7 @@ class ResponseDissector : semantics::non_constructible { d(pod.storage_status.device_status); d(pod.storage_status.progress_bar_value); #undef d + } out << "Payload:" << std::endl; out << pod.payload.dissect(); |