Show
Ignore:
Timestamp:
02/28/09 15:54:38 (3 years ago)
Author:
mwhitworth
Message:

Add some extra checks in the request layer.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/tags/0.2b/devices/kedev/sdevice.c

    r1811 r1953  
    119119        /* Set up the request list head */ 
    120120        INIT_LIST_HEAD(&dev->requestList); 
     121        INIT_WAITQUEUE_HEAD(&dev->flushDone); 
    121122        return 0; 
    122123} 
     
    127128{ 
    128129        struct Request* request; 
     130 
     131        if (!buffer->device->blockSize) 
     132                return NULL; 
    129133 
    130134        request=(struct Request*)MemAlloc(sizeof(struct Request)); 
     
    197201         
    198202        request->ioStatus = status; 
    199          
     203                 
    200204        SpinLockIrq(&requestLock); 
    201         ListRemove(&request->list); 
     205         
     206        ListRemoveInit(&request->list); 
    202207 
    203208        if (status > 0) 
    204                 KePrint("I/O error reading sector %u\n",request->sector); 
     209                KePrint("I/O error reading sector %u (%d)\n",request->sector, status); 
    205210                 
    206211        /* BufferUnlock also wakes up the queue that's waiting for it */ 
     212         
    207213        BufferUnlock(request->buffer); 
     214                 
    208215        SpinUnlockIrq(&requestLock); 
    209216