Ignore:
File:
1 edited

Legend:

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

    r6afc9d7 rd96d9bc  
    3434#include <stdio.h>
    3535#include <stdlib.h>
    36 #include <unistd.h>
    3736#include <dirent.h>
    38 #include <fcntl.h>
    3937#include <getopt.h>
    4038#include <sys/types.h>
    41 #include <sys/stat.h>
     39#include <vfs/vfs.h>
    4240#include <str.h>
    4341#include <sort.h>
     
    185183                buff[len] = '\0';
    186184
    187                 rc = stat(buff, &tosort[nbdirs++].s);
    188                 if (rc != 0) {
     185                rc = vfs_stat_path(buff, &tosort[nbdirs++].s);
     186                if (rc != EOK) {
    189187                        printf("ls: skipping bogus node %s\n", buff);
    190                         printf("error=%d\n", errno);
     188                        printf("error=%d\n", rc);
    191189                        goto out;
    192190                }
     
    315313static unsigned int ls_scope(const char *path, struct dir_elem_t *de)
    316314{
    317         if (stat(path, &de->s) != 0) {
     315        if (vfs_stat_path(path, &de->s) != EOK) {
    318316                cli_error(CL_ENOENT, "%s", path);
    319317                return LS_BOGUS;
     
    388386
    389387        if (argc == 0) {
    390                 if (getcwd(de.name, PATH_MAX) == NULL) {
     388                if (vfs_cwd_get(de.name, PATH_MAX) != EOK) {
    391389                        cli_error(CL_EFAIL, "%s: Failed determining working "
    392390                            "directory", cmdname);
Note: See TracChangeset for help on using the changeset viewer.