From f9d8fe906bec042456b7037e3e99930fdded72ac Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Mon, 9 Dec 2024 18:11:21 +0100 Subject: [PATCH] Update s2pexec error handling --- cpp/s2pexec/s2pexec_core.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/s2pexec/s2pexec_core.cpp b/cpp/s2pexec/s2pexec_core.cpp index 207e3d68..2d4279fb 100644 --- a/cpp/s2pexec/s2pexec_core.cpp +++ b/cpp/s2pexec/s2pexec_core.cpp @@ -438,8 +438,10 @@ tuple S2pExec::ExecuteCommand() const int status = executor->ExecuteCommand(cdb, buffer, timeout); if (status) { - if (status != 0xff && request_sense) { - return executor->GetSenseData(); + if (status != 0xff) { + if (request_sense) { + return executor->GetSenseData(); + } } else { const string_view &command_name = CommandMetaData::Instance().GetCommandName(