Changeset f77c1c9 in mainline for uspace/lib/c/generic/elf/elf_mod.c


Ignore:
Timestamp:
2017-12-08T21:03:35Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c19a5a59
Parents:
c1694b6b
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 19:44:55)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
Message:

Return VFS handles separately from error codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/elf/elf_mod.c

    rc1694b6b rf77c1c9  
    9797        elf_ld_t elf;
    9898
    99         int ofile = vfs_clone(file, -1, true);
    100         int rc = vfs_open(ofile, MODE_READ);
     99        int ofile;
     100        int rc = vfs_clone(file, -1, true, &ofile);
     101        if (rc == EOK) {
     102                rc = vfs_open(ofile, MODE_READ);
     103        }
    101104        if (rc != EOK) {
    102105                return rc;
     
    116119    elf_finfo_t *info)
    117120{
    118         int file = vfs_lookup(path, 0);
    119         int rc = elf_load_file(file, so_bias, flags, info);
    120         vfs_put(file);
     121        int file;
     122        int rc = vfs_lookup(path, 0, &file);
     123        if (rc == EOK) {
     124                rc = elf_load_file(file, so_bias, flags, info);
     125                vfs_put(file);
     126        }
    121127        return rc;
    122128}
Note: See TracChangeset for help on using the changeset viewer.