/trunk/uspace/app/bdsh/input.c |
---|
61,7 → 61,7 |
if (NULL == usr->line) |
return CL_EFAIL; |
tmp = strdup(usr->line); |
tmp = str_dup(usr->line); |
cmd[n] = strtok(tmp, " "); |
while (cmd[n] && n < WORD_MAX) { |
155,7 → 155,7 |
/* Make sure we don't have rubbish or a C/R happy user */ |
if (str_cmp(line, "") == 0 || str_cmp(line, "\n") == 0) |
return; |
usr->line = strdup(line); |
usr->line = str_dup(line); |
return; |
} |
/trunk/uspace/app/bdsh/cmds/modules/touch/touch.c |
---|
80,7 → 80,7 |
} |
for (i = 1; i < argc; i ++) { |
buff = strdup(argv[i]); |
buff = str_dup(argv[i]); |
dirp = opendir(buff); |
if (dirp) { |
cli_error(CL_ENOTSUP, "%s is a directory", buff); |
/trunk/uspace/app/bdsh/cmds/modules/mkdir/mkdir.c |
---|
93,7 → 93,7 |
/* Its a good idea to allocate path, plus we (may) need a copy of |
* path to tokenize if parents are specified */ |
if (NULL == (tmp = strdup(path))) { |
if (NULL == (tmp = str_dup(path))) { |
cli_error(CL_ENOMEM, "%s: path too big?", cmdname); |
return 1; |
} |
/trunk/uspace/app/bdsh/cmds/modules/ls/ls.c |
---|
182,7 → 182,7 |
if (argc == 1) |
getcwd(buff, PATH_MAX); |
else |
strncpy(buff, argv[1], PATH_MAX); |
str_ncpy(buff, argv[1], PATH_MAX); |
scope = ls_scope(buff); |
/trunk/uspace/app/bdsh/exec.c |
---|
80,7 → 80,7 |
return (char *) cmd; |
} |
path_tok = strdup(PATH); |
path_tok = str_dup(PATH); |
/* Extract the PATH env to a path[] array */ |
path[n] = strtok(path_tok, PATH_DELIM); |
114,7 → 114,7 |
task_id_t tid; |
char *tmp; |
tmp = strdup(find_command(cmd)); |
tmp = str_dup(find_command(cmd)); |
free(found); |
tid = task_spawn((const char *)tmp, argv); |