Changeset 9c4cf0d in mainline for uspace/lib/bithenge/src/file.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, 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().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/src/file.c

    rb19e892 r9c4cf0d  
    8888{
    8989        file_blob_t *blob = blob_as_file(base);
    90         close(blob->fd);
     90        vfs_put(blob->fd);
    9191        free(blob);
    9292}
     
    106106        if (rc != EOK) {
    107107                if (needs_close)
    108                         close(fd);
     108                        vfs_put(fd);
    109109                return rc;
    110110        }
     
    114114        if (!blob) {
    115115                if (needs_close)
    116                         close(fd);
     116                        vfs_put(fd);
    117117                return ENOMEM;
    118118        }
     
    121121                free(blob);
    122122                if (needs_close)
    123                         close(fd);
     123                        vfs_put(fd);
    124124                return rc;
    125125        }
Note: See TracChangeset for help on using the changeset viewer.