Changeset 647 for trunk/libs/mini-libc/stdio.c
- Timestamp:
- Oct 22, 2019, 1:48:51 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/mini-libc/stdio.c
r643 r647 412 412 413 413 // compute nbytes 414 unsignedint nbytes = size * nitems;414 int nbytes = size * nitems; 415 415 416 416 if( hal_user_syscall( SYS_READ, … … 435 435 436 436 // compute nbytes 437 unsignedint nbytes = size * nitems;437 int nbytes = size * nitems; 438 438 439 439 if( hal_user_syscall( SYS_WRITE, … … 444 444 445 445 } // end fwrite() 446 447 ////////////////////////////////////////// 448 unsigned int fseek( FILE * stream, 449 unsigned int offset, 450 int whence ) 451 { 452 // check stream valid 453 if( stream->key != VALID_OPEN_FILE ) return -1; 454 455 // get file descriptor from stream pointer 456 int fd = stream->fd; 457 458 return( hal_user_syscall( SYS_LSEEK, 459 (reg_t)fd, 460 (reg_t)offset, 461 (reg_t)whence, 0 ) ); 462 } // end fseek() 446 463 447 464 /////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.