From a278d7cfc9551559b4503c5dd7853a038f5742c6 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sun, 22 Aug 2021 19:08:33 +0200 Subject: [PATCH] Logging update --- src/raspberrypi/controllers/scsidev_ctrl.cpp | 6 +++--- src/raspberrypi/devices/disk.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/raspberrypi/controllers/scsidev_ctrl.cpp b/src/raspberrypi/controllers/scsidev_ctrl.cpp index b72ef366..bd14cc6b 100644 --- a/src/raspberrypi/controllers/scsidev_ctrl.cpp +++ b/src/raspberrypi/controllers/scsidev_ctrl.cpp @@ -250,7 +250,7 @@ void SCSIDEV::Execute() ctrl.device = ctrl.unit[GetLun()]; } catch (const lun_exception& e) { - LOGINFO("%s Invalid LUN %d", __PRETTY_FUNCTION__, e.getlun()); + LOGINFO("%s Invalid LUN %d for ID %d", __PRETTY_FUNCTION__, e.getlun(), GetSCSIID()); Error(ERROR_CODES::sense_key::ILLEGAL_REQUEST, ERROR_CODES::asc::INVALID_LUN); return; @@ -337,7 +337,7 @@ void SCSIDEV::Error(ERROR_CODES::sense_key sense_key, ERROR_CODES::asc asc) lun = 0; } - LOGTRACE("%s Sense Key and ASC for subsequent REQUEST SENSE: $%02X, $%02X", __PRETTY_FUNCTION__, sense_key, asc); + LOGDEBUG("%s Sense Key and ASC: $%02X, $%02X", __PRETTY_FUNCTION__, sense_key, asc); if (sense_key || asc) { // Set Sense Key and ASC for a subsequent REQUEST SENSE @@ -661,7 +661,7 @@ void SCSIDEV::Receive() Execute(); } catch (const lun_exception& e) { - LOGINFO("%s Invalid LUN %d", __PRETTY_FUNCTION__, e.getlun()); + LOGINFO("%s Invalid LUN %d for ID %d", __PRETTY_FUNCTION__, e.getlun(), GetSCSIID()); Error(ERROR_CODES::sense_key::ILLEGAL_REQUEST, ERROR_CODES::asc::INVALID_LUN); } diff --git a/src/raspberrypi/devices/disk.cpp b/src/raspberrypi/devices/disk.cpp index 90d5beef..4c6ee123 100644 --- a/src/raspberrypi/devices/disk.cpp +++ b/src/raspberrypi/devices/disk.cpp @@ -1466,7 +1466,7 @@ int Disk::RequestSense(const DWORD *cdb, BYTE *buf) // Size determination (according to allocation length) int size = (int)cdb[4]; - LOGDEBUG("%s size of data = %d", __PRETTY_FUNCTION__, size); + LOGTRACE("%s size of data = %d", __PRETTY_FUNCTION__, size); ASSERT((size >= 0) && (size < 0x100)); // For SCSI-1, transfer 4 bytes when the size is 0