Subversion Repositories HelenOS

Rev

Rev 3812 | Rev 3980 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3812 Rev 3813
Line 55... Line 55...
55
    char *tmp;
55
    char *tmp;
56
 
56
 
57
    if (NULL == usr->line)
57
    if (NULL == usr->line)
58
        return CL_EFAIL;
58
        return CL_EFAIL;
59
 
59
 
60
    tmp = cli_strdup(usr->line);
60
    tmp = strdup(usr->line);
61
 
61
 
62
    cmd[n] = cli_strtok(tmp, " ");
62
    cmd[n] = strtok(tmp, " ");
63
    while (cmd[n] && n < WORD_MAX) {
63
    while (cmd[n] && n < WORD_MAX) {
64
        cmd[++n] = cli_strtok(NULL, " ");
64
        cmd[++n] = strtok(NULL, " ");
65
    }
65
    }
66
 
66
 
67
    /* We have rubbish */
67
    /* We have rubbish */
68
    if (NULL == cmd[0]) {
68
    if (NULL == cmd[0]) {
69
        rc = CL_ENOENT;
69
        rc = CL_ENOENT;
Line 136... Line 136...
136
    read_line(line, INPUT_MAX);
136
    read_line(line, INPUT_MAX);
137
    len = strlen(line);
137
    len = strlen(line);
138
    /* Make sure we don't have rubbish or a C/R happy user */
138
    /* Make sure we don't have rubbish or a C/R happy user */
139
    if (len == 0 || line[0] == '\n')
139
    if (len == 0 || line[0] == '\n')
140
        return;
140
        return;
141
    usr->line = cli_strdup(line);
141
    usr->line = strdup(line);
142
 
142
 
143
    return;
143
    return;
144
}
144
}
145
 
145