Changeset 58898d1d in mainline for uspace/app/tester/vfs/vfs1.c


Ignore:
Timestamp:
2017-03-24T20:31:54Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8e9b2534
Parents:
c9e3692
Message:

Remove VFS_IN_SEEK from VFS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/vfs/vfs1.c

    rc9e3692 r58898d1d  
    7070const char *test_vfs1(void)
    7171{
     72        aoff64_t pos = 0;
     73
    7274        if (mkdir(TEST_DIRECTORY, 0) != 0) {
    7375                TPRINTF("rc=%d\n", errno);
     
    8284       
    8385        size_t size = sizeof(text);
    84         ssize_t cnt = write(fd0, text, size);
     86        ssize_t cnt = write(fd0, &pos, text, size);
    8587        if (cnt < 0)
    8688                return "write() failed";
    8789        TPRINTF("Written %zd bytes\n", cnt);
    88        
    89         if (lseek(fd0, 0, SEEK_SET) != 0)
    90                 return "lseek() failed";
    91         TPRINTF("Sought to position 0\n");
     90
     91        pos = 0;
    9292       
    9393        char buf[BUF_SIZE];
    9494        TPRINTF("read..\n");
    95         while ((cnt = read(fd0, buf, BUF_SIZE))) {
     95        while ((cnt = read(fd0, &pos, buf, BUF_SIZE))) {
    9696                TPRINTF("read returns %zd\n", cnt);
    9797                if (cnt < 0)
Note: See TracChangeset for help on using the changeset viewer.