forked from KolibriOS/kolibrios
Clib chsize, fstat, setmode.
set_file_size: watcom-specific implementation git-svn-id: svn://kolibrios.org@727 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -46,19 +46,19 @@ typedef struct
|
||||
|
||||
int __qread( int handle, void *buffer, unsigned len )
|
||||
{
|
||||
int err;
|
||||
|
||||
__file_handle *fh;
|
||||
unsigned amount_read=0;
|
||||
|
||||
__handle_check( handle, -1 );
|
||||
fh = (__file_handle*) __getOSHandle( handle );
|
||||
|
||||
if(read_file(fh->name,buffer,fh->offset,len,&amount_read))
|
||||
{
|
||||
|
||||
err = read_file(fh->name,buffer,fh->offset,len,&amount_read);
|
||||
fh->offset+=amount_read;
|
||||
if(err)
|
||||
if ( amount_read == 0)
|
||||
return (-1);
|
||||
|
||||
}
|
||||
fh->offset+=amount_read;
|
||||
return( amount_read );
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user