Show
Ignore:
Timestamp:
05/20/10 16:05:25 (2 years ago)
Author:
mwhitworth
Message:

Add to TCP/IP stack.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/netchannel/user/posix/file/file.c

    r1362 r2085  
    1010#include <syscalls.h> 
    1111 
     12#include "internal.h" 
     13 
    1214/* Sanity check these functions */ 
    1315 
     
    8991int close(int fd) 
    9092{ 
    91         return SysClose(fd); 
     93        struct PosixFile* file = PosixHandleToFile(fd); 
     94        int ret = -1; 
     95 
     96        if (file && file->type && file->type->close) 
     97        { 
     98                ret = file->type->close(file); 
     99 
     100                if (ret == 0) 
     101                { 
     102                        printf("close: free entry in table.\n"); 
     103                } 
     104        } 
     105         
     106        return ret; 
    92107} 
    93108