Changeset 2b3dd78 in mainline for uspace/app/bdsh/compl.c


Ignore:
Timestamp:
2018-01-31T12:02:00Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
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.
Message:

Merge remote-tracking branch 'upstream/master' into forwardport

change tmon includes because of new stdlib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/compl.c

    ra0a9cc2 r2b3dd78  
    3434#include <stdlib.h>
    3535#include <vfs/vfs.h>
     36#include <str.h>
    3637
    3738#include "cmds/cmds.h"
     
    6869
    6970        /** Pointer inside list of directories */
    70         const char **path;
     71        const char *const *path;
    7172        /** If not @c NULL, should be freed in the end. */
    72         const char **path_list;
     73        char **path_list;
    7374        /** Current open directory */
    7475        DIR *dir;
     
    218219                cs->path_list[0] = dirname;
    219220                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;
    221224
    222225        } else if (cs->is_command) {
     
    359362                                char *ent_path;
    360363                                asprintf(&ent_path, "%s/%s", *cs->path, dent->d_name);
    361                                 struct stat ent_stat;
     364                                vfs_stat_t ent_stat;
    362365                                if (vfs_stat_path(ent_path, &ent_stat) != EOK) {
    363366                                        /* Error */
Note: See TracChangeset for help on using the changeset viewer.