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


Ignore:
Timestamp:
2017-04-02T10:39:13Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c4cf0d
Parents:
80743a1
Message:

Merge open() with posix_open() and provide vfs_lookup_open() instead

vfs_lookup_open() is really just a convenience wrapper around
vfs_lookup() and vfs_open().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/src/os/helenos.c

    r80743a1 rb19e892  
    4141#include <stdio.h>
    4242#include <task.h>
    43 #include <fcntl.h>
    4443#include <fibril_synch.h>
    4544#include <vfs/vfs.h>
     
    162161        char tempfile_name[PCUT_TEMP_FILENAME_BUFFER_SIZE];
    163162        snprintf(tempfile_name, PCUT_TEMP_FILENAME_BUFFER_SIZE - 1, "pcut_%lld.tmp", (unsigned long long) task_get_id());
    164         int tempfile = open(tempfile_name, O_CREAT | O_RDWR);
     163        int tempfile = vfs_lookup_open(tempfile_name, WALK_REGULAR | WALK_MAY_CREATE, MODE_READ | MODE_WRITE);
    165164        if (tempfile < 0) {
    166165                pcut_report_test_done(test, TEST_OUTCOME_ERROR, "Failed to create temporary file.", NULL, NULL);
Note: See TracChangeset for help on using the changeset viewer.