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/app/bdsh/cmds/modules/mkfile/mkfile.c

    rb19e892 r9c4cf0d  
    168168                rc2 = write(fd, &pos, &byte, sizeof(char));
    169169                if (rc2 < 0) {
    170                         close(fd);
     170                        vfs_put(fd);
    171171                        goto error;
    172172                }
     
    186186                if (rc <= 0) {
    187187                        printf("%s: Error writing file (%d).\n", cmdname, errno);
    188                         close(fd);
     188                        vfs_put(fd);
    189189                        free(buffer);
    190190                        return CMD_FAILURE;
     
    195195        free(buffer);
    196196
    197         if (close(fd) < 0)
     197        if (vfs_put(fd) < 0)
    198198                goto error;
    199199
Note: See TracChangeset for help on using the changeset viewer.