Changeset 9c4cf0d in mainline for uspace/app/sysinst/futil.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/app/sysinst/futil.c

    rb19e892 r9c4cf0d  
    8383        } while (true);
    8484
    85         (void) close(sf);
     85        (void) vfs_put(sf);
    8686
    87         rc = close(df);
     87        rc = vfs_put(df);
    8888        if (rc < 0)
    8989                return EIO;
     
    166166
    167167        if (vfs_stat(sf, &st) != EOK) {
    168                 close(sf);
     168                vfs_put(sf);
    169169                return EIO;
    170170        }       
     
    174174        data = calloc(fsize, 1);
    175175        if (data == NULL) {
    176                 close(sf);
     176                vfs_put(sf);
    177177                return ENOMEM;
    178178        }
     
    180180        nr = read(sf, (aoff64_t []) { 0 }, data, fsize);
    181181        if (nr != (ssize_t)fsize) {
    182                 close(sf);
     182                vfs_put(sf);
    183183                free(data);
    184184                return EIO;
    185185        }
    186186
    187         (void) close(sf);
     187        (void) vfs_put(sf);
    188188        *rdata = data;
    189189        *rsize = fsize;
Note: See TracChangeset for help on using the changeset viewer.