Changes in uspace/app/bdsh/cmds/modules/ls/ls.c [6afc9d7:d96d9bc] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/ls/ls.c
r6afc9d7 rd96d9bc 34 34 #include <stdio.h> 35 35 #include <stdlib.h> 36 #include <unistd.h>37 36 #include <dirent.h> 38 #include <fcntl.h>39 37 #include <getopt.h> 40 38 #include <sys/types.h> 41 #include < sys/stat.h>39 #include <vfs/vfs.h> 42 40 #include <str.h> 43 41 #include <sort.h> … … 185 183 buff[len] = '\0'; 186 184 187 rc = stat(buff, &tosort[nbdirs++].s);188 if (rc != 0) {185 rc = vfs_stat_path(buff, &tosort[nbdirs++].s); 186 if (rc != EOK) { 189 187 printf("ls: skipping bogus node %s\n", buff); 190 printf("error=%d\n", errno);188 printf("error=%d\n", rc); 191 189 goto out; 192 190 } … … 315 313 static unsigned int ls_scope(const char *path, struct dir_elem_t *de) 316 314 { 317 if ( stat(path, &de->s) != 0) {315 if (vfs_stat_path(path, &de->s) != EOK) { 318 316 cli_error(CL_ENOENT, "%s", path); 319 317 return LS_BOGUS; … … 388 386 389 387 if (argc == 0) { 390 if ( getcwd(de.name, PATH_MAX) == NULL) {388 if (vfs_cwd_get(de.name, PATH_MAX) != EOK) { 391 389 cli_error(CL_EFAIL, "%s: Failed determining working " 392 390 "directory", cmdname);
Note:
See TracChangeset
for help on using the changeset viewer.