Ignore:
Timestamp:
2017-04-02T10:39:13Z (8 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/app/bdsh/cmds/modules/cmp/cmp.c

    r80743a1 rb19e892  
    2828
    2929#include <errno.h>
    30 #include <fcntl.h>
    3130#include <getopt.h>
    3231#include <mem.h>
     
    8281
    8382        for (int i = 0; i < 2; i++) {
    84                 fd[i] = open(fn[i], O_RDONLY);
     83                fd[i] = vfs_lookup_open(fn[i], WALK_REGULAR, MODE_READ);
    8584                if (fd[i] < 0) {
    86                         rc = errno;
     85                        rc = fd[i];
    8786                        printf("Unable to open %s\n", fn[i]);
    8887                        goto end;
Note: See TracChangeset for help on using the changeset viewer.