Changeset 9c4cf0d in mainline for uspace/app/tester


Ignore:
Timestamp:
2017-04-02T11:24:06Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
151f1cc
Parents:
b19e892
Message:

Rename close() to vfs_put()

This is motivated mainly by the fact that a file handle does not
necessarily correspond to an open file and close() was no longer the
the opposite operation to open().

Location:
uspace/app/tester
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/hw/misc/virtchar1.c

    rb19e892 r9c4cf0d  
    6969        async_sess_t *sess = vfs_fd_session(fd, INTERFACE_DDF);
    7070        if (!sess) {
    71                 close(fd);
     71                vfs_put(fd);
    7272                TPRINTF("   ...error: %s\n", str_error(errno));
    7373                return "Failed to get session to device";
     
    9090        TPRINTF(" Closing session and file descriptor\n");
    9191        async_hangup(sess);
    92         close(fd);
     92        vfs_put(fd);
    9393       
    9494        return NULL;
  • uspace/app/tester/mm/pager1.c

    rb19e892 r9c4cf0d  
    5454
    5555        if (write(fd, (aoff64_t []) {0}, text, sizeof(text)) != sizeof(text)) {
    56                 close(fd);
     56                vfs_put(fd);
    5757                return NULL;
    5858        }
     
    6565
    6666        if (!vfs_pager_sess) {
    67                 close(fd);
     67                vfs_put(fd);
    6868                return NULL;
    6969        }
     
    7474            AS_AREA_READ | AS_AREA_CACHEABLE, vfs_pager_sess, fd, 0, 0);
    7575        if (result == AS_MAP_FAILED) {
    76                 close(fd);
     76                vfs_put(fd);
    7777                return NULL;
    7878        }
     
    102102
    103103        as_area_destroy(buffer);       
    104         close(fd);
     104        vfs_put(fd);
    105105       
    106106        return NULL;
  • uspace/app/tester/vfs/vfs1.c

    rb19e892 r9c4cf0d  
    108108        }
    109109       
    110         close(fd0);
     110        vfs_put(fd0);
    111111       
    112112        const char *rv = read_root();
Note: See TracChangeset for help on using the changeset viewer.