This commit is contained in:
Uwe Seimet 2023-09-29 10:53:41 +02:00
parent 9631e9cb10
commit 06812156ea
2 changed files with 3 additions and 3 deletions

View File

@ -654,8 +654,8 @@ bool PiscsiExecutor::ValidateIdAndLun(const CommandContext& context, int id, int
if (id < 0) {
return context.ReturnLocalizedError(LocalizationKey::ERROR_MISSING_DEVICE_ID);
}
if (id >= DEVICE_MAX) {
return context.ReturnLocalizedError(LocalizationKey::ERROR_INVALID_ID, to_string(id), to_string(DEVICE_MAX - 1));
if (id >= CONTROLLER_MAX) {
return context.ReturnLocalizedError(LocalizationKey::ERROR_INVALID_ID, to_string(id), to_string(CONTROLLER_MAX - 1));
}
if (lun < 0 || lun >= ControllerManager::GetScsiLunMax()) {
return context.ReturnLocalizedError(LocalizationKey::ERROR_INVALID_LUN, to_string(lun), to_string(ControllerManager::GetScsiLunMax() - 1));

View File

@ -61,7 +61,7 @@ private:
static bool CheckForReservedFile(const CommandContext&, const string&);
// Maximum number of controller devices
static const int DEVICE_MAX = 8;
static const int CONTROLLER_MAX = 8;
const PiscsiResponse piscsi_response;