Changeset 9c4cf0d in mainline for uspace/lib/c/generic/io/io.c


Ignore:
Timestamp:
2017-04-02T11:24:06Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
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().

File:
1 edited

Legend:

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

    rb19e892 r9c4cf0d  
    305305        if (rc != EOK) {
    306306                errno = rc;
    307                 close(file);
     307                vfs_put(file);
    308308                free(stream);
    309309                return NULL;
     
    314314                if (rc != EOK) {
    315315                        errno = rc;
    316                         close(file);
     316                        vfs_put(file);
    317317                        free(stream);
    318318                        return NULL;
     
    370370       
    371371        if (stream->fd >= 0)
    372                 rc = close(stream->fd);
     372                rc = vfs_put(stream->fd);
    373373       
    374374        list_remove(&stream->link);
Note: See TracChangeset for help on using the changeset viewer.