Changeset aeeaf0f in mainline for uspace/app/bdsh/util.c


Ignore:
Timestamp:
2019-05-19T07:28:42Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a78cdcd
Parents:
6aeb60f (diff), 587867a (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.
git-author:
Jakub Jermář <jakub@…> (2019-05-19 07:28:42)
git-committer:
GitHub <noreply@…> (2019-05-19 07:28:42)
Message:

Merge pull request #163 from matthieuriolo/ticket_684_improved

Ticket 684 improved

File:
1 edited

Legend:

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

    r6aeb60f raeeaf0f  
    7474        return 0;
    7575}
     76
     77/*
     78 * Returns true if the string is a relative or an absolute path
     79 */
     80bool is_path(const char *cmd)
     81{
     82
     83        bool ret = str_lcmp(cmd, "/", 1) == 0;
     84        ret = ret || str_lcmp(cmd, "./", 2) == 0;
     85        ret = ret || str_lcmp(cmd, "../", 3) == 0;
     86
     87        return ret;
     88}
Note: See TracChangeset for help on using the changeset viewer.