Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/getterm/getterm.c

    r8d2dd7f2 r1d6dd2a  
    4242#include <loc.h>
    4343#include <vfs/vfs.h>
     44#include <str.h>
    4445#include "version.h"
    4546#include "welcome.h"
     
    6566        *stream = NULL;
    6667       
    67         int oldfd = vfs_lookup_open(path, WALK_REGULAR, mode);
    68         if (oldfd < 0)
     68        int oldfd;
     69        errno_t rc = vfs_lookup_open(path, WALK_REGULAR, mode, &oldfd);
     70        if (rc != EOK)
    6971                return;
    7072       
    7173        if (oldfd != fd) {
    72                 if (vfs_clone(oldfd, fd, false) != fd)
     74                int newfd;
     75                if (vfs_clone(oldfd, fd, false, &newfd) != EOK)
    7376                        return;
    7477               
     78                assert(newfd == fd);
     79
    7580                if (vfs_put(oldfd))
    7681                        return;
     
    129134                /* Wait for the terminal service to be ready */
    130135                service_id_t service_id;
    131                 int rc = loc_service_get_id(term, &service_id, IPC_FLAG_BLOCKING);
     136                errno_t rc = loc_service_get_id(term, &service_id, IPC_FLAG_BLOCKING);
    132137                if (rc != EOK) {
    133138                        printf("%s: Error waiting on %s (%s)\n", APP_NAME, term,
     
    166171        task_wait_t twait;
    167172       
    168         int rc = task_spawnv(&id, &twait, cmd, (const char * const *) args);
     173        errno_t rc = task_spawnv(&id, &twait, cmd, (const char * const *) args);
    169174        if (rc != EOK) {
    170175                printf("%s: Error spawning %s (%s)\n", APP_NAME, cmd,
Note: See TracChangeset for help on using the changeset viewer.