Changeset 2b3dd78 in mainline for uspace/app/bdsh/compl.c
- Timestamp:
- 2018-01-31T12:02:00Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5595841
- Parents:
- a0a9cc2 (diff), 14d789c (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/compl.c
ra0a9cc2 r2b3dd78 34 34 #include <stdlib.h> 35 35 #include <vfs/vfs.h> 36 #include <str.h> 36 37 37 38 #include "cmds/cmds.h" … … 68 69 69 70 /** Pointer inside list of directories */ 70 const char * *path;71 const char *const *path; 71 72 /** If not @c NULL, should be freed in the end. */ 72 c onst char **path_list;73 char **path_list; 73 74 /** Current open directory */ 74 75 DIR *dir; … … 218 219 cs->path_list[0] = dirname; 219 220 cs->path_list[1] = NULL; 220 cs->path = cs->path_list; 221 /* The second const ensures that we can't assign a const 222 * string to the non-const array. */ 223 cs->path = (const char *const *) cs->path_list; 221 224 222 225 } else if (cs->is_command) { … … 359 362 char *ent_path; 360 363 asprintf(&ent_path, "%s/%s", *cs->path, dent->d_name); 361 struct stat ent_stat;364 vfs_stat_t ent_stat; 362 365 if (vfs_stat_path(ent_path, &ent_stat) != EOK) { 363 366 /* Error */
Note:
See TracChangeset
for help on using the changeset viewer.