Use configured serial number in inquiry responses
authorMichael McMaster <michael@codesrc.com>
Mon, 22 Feb 2021 10:31:25 +0000 (20:31 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 22 Feb 2021 10:31:25 +0000 (20:31 +1000)
src/firmware/inquiry.c

index 138e8c2182d6ef4acf3b42911fb50181cbeed834..ded201c68c68e10df14359fb40b29e70932b65e9 100755 (executable)
@@ -123,6 +123,8 @@ void s2s_scsiInquiry()
        {\r
                memcpy(scsiDev.data, UnitSerialNumber, sizeof(UnitSerialNumber));\r
                scsiDev.dataLen = sizeof(UnitSerialNumber);\r
+        const S2S_TargetCfg* config = scsiDev.target->cfg;\r
+        memcpy(&scsiDev.data[4], config->serial, sizeof(config->serial));\r
                scsiDev.phase = DATA_IN;\r
        }\r
        else if (pageCode == 0x81)\r