Changeset 23a0368 in mainline for uspace/app/bdsh/cmds/modules/ls/ls.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/ls/ls.c

    rb5b5d84 r23a0368  
    3939#include <getopt.h>
    4040#include <sys/types.h>
    41 #include <sys/stat.h>
     41#include <vfs/vfs.h>
    4242#include <str.h>
    4343#include <sort.h>
     
    185185                buff[len] = '\0';
    186186
    187                 rc = stat(buff, &tosort[nbdirs++].s);
    188                 if (rc != 0) {
     187                rc = vfs_stat_path(buff, &tosort[nbdirs++].s);
     188                if (rc != EOK) {
    189189                        printf("ls: skipping bogus node %s\n", buff);
    190                         printf("error=%d\n", errno);
     190                        printf("error=%d\n", rc);
    191191                        goto out;
    192192                }
     
    315315static unsigned int ls_scope(const char *path, struct dir_elem_t *de)
    316316{
    317         if (stat(path, &de->s) != 0) {
     317        if (vfs_stat_path(path, &de->s) != EOK) {
    318318                cli_error(CL_ENOENT, "%s", path);
    319319                return LS_BOGUS;
Note: See TracChangeset for help on using the changeset viewer.