REPORT LUNS: truncate response by allocation length
This commit is contained in:
@@ -404,7 +404,6 @@ sense:
|
|||||||
func SPCReportLuns(host int, cmd *api.SCSICommand) api.SAMStat {
|
func SPCReportLuns(host int, cmd *api.SCSICommand) api.SAMStat {
|
||||||
var (
|
var (
|
||||||
remainLength uint32
|
remainLength uint32
|
||||||
actualLength uint32 = 8
|
|
||||||
availLength uint32 = 0
|
availLength uint32 = 0
|
||||||
allocationLength uint32
|
allocationLength uint32
|
||||||
buf *bytes.Buffer = &bytes.Buffer{}
|
buf *bytes.Buffer = &bytes.Buffer{}
|
||||||
@@ -425,7 +424,7 @@ func SPCReportLuns(host int, cmd *api.SCSICommand) api.SAMStat {
|
|||||||
|
|
||||||
// LUN list length
|
// LUN list length
|
||||||
buf.Write(util.MarshalUint32(availLength))
|
buf.Write(util.MarshalUint32(availLength))
|
||||||
cmd.InSDBBuffer.Resid = uint32(actualLength)
|
cmd.InSDBBuffer.Resid = allocationLength
|
||||||
|
|
||||||
// Skip through to byte 4, Reserved
|
// Skip through to byte 4, Reserved
|
||||||
for i := 0; i < 4; i++ {
|
for i := 0; i < 4; i++ {
|
||||||
|
|||||||
Reference in New Issue
Block a user