Changeset f77c1c9 in mainline for uspace/lib/pcut/src/os/helenos.c


Ignore:
Timestamp:
2017-12-08T21:03:35Z (7 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/pcut/src/os/helenos.c

    rc1694b6b rf77c1c9  
    159159        char tempfile_name[PCUT_TEMP_FILENAME_BUFFER_SIZE];
    160160        snprintf(tempfile_name, PCUT_TEMP_FILENAME_BUFFER_SIZE - 1, "pcut_%lld.tmp", (unsigned long long) task_get_id());
    161         int tempfile = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE);
    162         if (tempfile < 0) {
     161        int tempfile;
     162        int rc = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE, &tempfile);
     163        if (rc != EOK) {
    163164                pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, "Failed to create temporary file.", NULL, NULL);
    164165                return PCUT_OUTCOME_INTERNAL_ERROR;
     
    177178
    178179        task_wait_t test_task_wait;
    179         int rc = task_spawnvf(&test_task_id, &test_task_wait, self_path, arguments,
     180        rc = task_spawnvf(&test_task_id, &test_task_wait, self_path, arguments,
    180181            fileno(stdin), tempfile, tempfile);
    181182        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.