Changeset 23a0368 in mainline for uspace/app/bdsh/cmds/modules/cp/cp.c


Ignore:
Timestamp:
2017-03-30T19:52:23Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ae7bfbbd
Parents:
b5b5d84
Message:

Rename stat() to vfs_stat_path() and fstat() to vfs_stat()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/cp/cp.c

    rb5b5d84 r23a0368  
    3737#include <fcntl.h>
    3838#include <sys/stat.h>
     39#include <vfs/vfs.h>
    3940#include <dirent.h>
    4041#include "config.h"
     
    8384        struct stat s;
    8485
    85         int r = stat(path, &s);
    86 
    87         if (r != 0)
     86        int r = vfs_stat_path(path, &s);
     87
     88        if (r != EOK)
    8889                return TYPE_NONE;
    8990        else if (s.is_directory)
     
    341342
    342343                        /* Check if we are copying a directory into itself */
    343                         stat(src_dent, &src_s);
    344                         stat(dest_path, &dest_s);
     344                        vfs_stat_path(src_dent, &src_s);
     345                        vfs_stat_path(dest_path, &dest_s);
    345346
    346347                        if (dest_s.index == src_s.index &&
     
    394395        }
    395396
    396         if (fstat(fd1, &st) != EOK) {
     397        if (vfs_stat(fd1, &st) != EOK) {
    397398                printf("Unable to fstat %d\n", fd1);
    398399                close(fd1);
Note: See TracChangeset for help on using the changeset viewer.