From 587d0c4e7e6913ccac86c4f8239fd3ea5754b65e Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Mon, 13 Aug 2018 18:40:24 -0500 Subject: [PATCH] Consistently set transfer count when doing Get_Device_Status. --- driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/driver.c b/driver.c index 6e7d844..f369b3a 100644 --- a/driver.c +++ b/driver.c @@ -327,8 +327,8 @@ static Word DoRead(struct GSOSDP *dp) { return 0; } +/* This implements the Get_Device_Status subcall of Driver_Status */ static Word DoStatus(struct GSOSDP *dp) { - Session *sess = dp->dibPointer->extendedDIBPtr; DeviceStatusRec *dsRec = (DeviceStatusRec*)dp->statusListPtr; if (dp->requestCount < 2) { @@ -336,7 +336,7 @@ static Word DoStatus(struct GSOSDP *dp) { return drvrBadParm; } //TODO disk-switched logic - if (sess != NULL) { + if (dp->dibPointer->extendedDIBPtr != NULL) { dsRec->statusWord = 0x0014; } else { dsRec->statusWord = 0; @@ -349,7 +349,7 @@ static Word DoStatus(struct GSOSDP *dp) { if (dsRec->numBlocks == 0) { dsRec->statusWord |= 0x8000; } - dp->requestCount = 6; + dp->transferCount = 6; return 0; }