Changeset 4cc0c9ee in mainline for uspace/app/bdsh/cmds


Ignore:
Timestamp:
2009-01-22T14:22:12Z (17 years ago)
Author:
Tim Post <echo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bf226890
Parents:
fc11b8a
Message:

Get rid of cli_strdup(), cli_strtok(), cli_strtok_r(), just use facilities in libc

Location:
uspace/app/bdsh/cmds/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/mkdir/mkdir.c

    rfc11b8a r4cc0c9ee  
    9494        /* Its a good idea to allocate path, plus we (may) need a copy of
    9595         * path to tokenize if parents are specified */
    96         if (NULL == (tmp = cli_strdup(path))) {
     96        if (NULL == (tmp = strdup(path))) {
    9797                cli_error(CL_ENOMEM, "%s: path too big?", cmdname);
    9898                return 1;
     
    129129
    130130        /* TODO: Canonify the path prior to tokenizing it, see below */
    131         dirs[i] = cli_strtok(tmp, "/");
     131        dirs[i] = strtok(tmp, "/");
    132132        while (dirs[i] && i < 255)
    133                 dirs[++i] = cli_strtok(NULL, "/");
     133                dirs[++i] = strtok(NULL, "/");
    134134
    135135        if (NULL == dirs[0])
  • uspace/app/bdsh/cmds/modules/touch/touch.c

    rfc11b8a r4cc0c9ee  
    3838#include <dirent.h>
    3939#include <sys/types.h>
     40#include <string.h>
    4041
    4142#include "config.h"
     
    8081
    8182        for (i = 1; i < argc; i ++) {
    82                 buff = cli_strdup(argv[i]);
     83                buff = strdup(argv[i]);
    8384                dirp = opendir(buff);
    8485                if (dirp) {
Note: See TracChangeset for help on using the changeset viewer.