Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4295 → Rev 4296

/branches/dd/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);
/branches/dd/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;
}
149,7 → 149,7
while (dirs[i] != NULL) {
/* Sometimes make or scripts conjoin odd paths. Account for something
* like this: ../../foo/bar/../foo/foofoo/./bar */
if (!strcmp(dirs[i], "..") || !strcmp(dirs[i], ".")) {
if (!str_cmp(dirs[i], "..") || !str_cmp(dirs[i], ".")) {
if (0 != (chdir(dirs[i]))) {
cli_error(CL_EFAIL, "%s: impossible path: %s",
cmdname, path);
/branches/dd/uspace/app/bdsh/cmds/modules/help/help.c
107,7 → 107,7
}
 
if (argc == 3) {
if (!strcmp("extended", argv[2]))
if (!str_cmp("extended", argv[2]))
level = HELP_LONG;
else
level = HELP_SHORT;
/branches/dd/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_cpy(buff, PATH_MAX, argv[1]);
 
scope = ls_scope(buff);
 
/branches/dd/uspace/app/bdsh/cmds/modules/rm/rm.c
216,7 → 216,7
 
i = optind;
while (NULL != argv[i]) {
len = strlen(argv[i]) + 2;
len = str_size(argv[i]) + 2;
buff = (char *) realloc(buff, len);
if (buff == NULL) {
printf("rm: out of memory\n");