From e3d88377463f4706372ae7fd6c85937f6035b5ef Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 18 Feb 2017 17:06:10 +0100 Subject: Show Storage status only on matching command code Should not show on commands where it is not supplied Signed-off-by: Szczepan Zalega --- include/dissect.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(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(); -- cgit v1.2.3