Changeset 368ee04 in mainline for uspace/app/bdsh/cmds/modules/ls/ls.c
- Timestamp:
- 2017-04-05T18:10:39Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 93ad8166
- Parents:
- 39f892a9 (diff), 2166728 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/ls/ls.c
r39f892a9 r368ee04 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.