mirror of
https://github.com/sheumann/NetDisk.git
synced 2024-11-23 22:37:02 +00:00
Consistently set transfer count when doing Get_Device_Status.
This commit is contained in:
parent
77f16625c6
commit
587d0c4e7e
6
driver.c
6
driver.c
@ -327,8 +327,8 @@ static Word DoRead(struct GSOSDP *dp) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This implements the Get_Device_Status subcall of Driver_Status */
|
||||||
static Word DoStatus(struct GSOSDP *dp) {
|
static Word DoStatus(struct GSOSDP *dp) {
|
||||||
Session *sess = dp->dibPointer->extendedDIBPtr;
|
|
||||||
DeviceStatusRec *dsRec = (DeviceStatusRec*)dp->statusListPtr;
|
DeviceStatusRec *dsRec = (DeviceStatusRec*)dp->statusListPtr;
|
||||||
|
|
||||||
if (dp->requestCount < 2) {
|
if (dp->requestCount < 2) {
|
||||||
@ -336,7 +336,7 @@ static Word DoStatus(struct GSOSDP *dp) {
|
|||||||
return drvrBadParm;
|
return drvrBadParm;
|
||||||
}
|
}
|
||||||
//TODO disk-switched logic
|
//TODO disk-switched logic
|
||||||
if (sess != NULL) {
|
if (dp->dibPointer->extendedDIBPtr != NULL) {
|
||||||
dsRec->statusWord = 0x0014;
|
dsRec->statusWord = 0x0014;
|
||||||
} else {
|
} else {
|
||||||
dsRec->statusWord = 0;
|
dsRec->statusWord = 0;
|
||||||
@ -349,7 +349,7 @@ static Word DoStatus(struct GSOSDP *dp) {
|
|||||||
if (dsRec->numBlocks == 0) {
|
if (dsRec->numBlocks == 0) {
|
||||||
dsRec->statusWord |= 0x8000;
|
dsRec->statusWord |= 0x8000;
|
||||||
}
|
}
|
||||||
dp->requestCount = 6;
|
dp->transferCount = 6;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user