From a3645dfecce7becef9e84500f7a942addae166e1 Mon Sep 17 00:00:00 2001 From: Pacjunk <92196260+Pacjunk@users.noreply.github.com> Date: Sun, 14 Nov 2021 20:41:34 +1100 Subject: [PATCH] Update disk.cpp - modesense10 command length (#464) Modesense(10) has 2 length bytes, therefore the size adjustment must be 2, not 1! --- src/raspberrypi/devices/disk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raspberrypi/devices/disk.cpp b/src/raspberrypi/devices/disk.cpp index 9763056e..edda0791 100644 --- a/src/raspberrypi/devices/disk.cpp +++ b/src/raspberrypi/devices/disk.cpp @@ -917,8 +917,8 @@ int Disk::ModeSense10(const DWORD *cdb, BYTE *buf) } // final setting of mode data length - buf[0] = (size - 1) >> 8; - buf[1] = size - 1; + buf[0] = (size - 2) >> 8; + buf[1] = size - 2; // Unsupported page if (!valid) {