Changeset 08232ee in mainline for uspace/lib/libc/generic/io/io.c


Ignore:
Timestamp:
2010-01-09T21:52:07Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9245413
Parents:
dccf721
Message:

Obtain block device size automatically, if possible. Implement ftell(). Fix seek implementation in VFS if whence == SEEK_END.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/io/io.c

    rdccf721 r08232ee  
    554554}
    555555
     556int ftell(FILE *stream)
     557{
     558        off_t rc = lseek(stream->fd, 0, SEEK_CUR);
     559        if (rc == (off_t) (-1)) {
     560                /* errno has been set by lseek. */
     561                return -1;
     562        }
     563
     564        return rc;
     565}
     566
    556567void rewind(FILE *stream)
    557568{
Note: See TracChangeset for help on using the changeset viewer.