Rev 3459 | Rev 3481 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3459 | Rev 3461 | ||
---|---|---|---|
Line 271... | Line 271... | ||
271 | usr->cwd = getcwd(usr->cwd, PATH_MAX - 1); |
271 | usr->cwd = getcwd(usr->cwd, PATH_MAX - 1); |
272 | 272 | ||
273 | if (NULL == usr->cwd) |
273 | if (NULL == usr->cwd) |
274 | snprintf(usr->cwd, PATH_MAX, "(unknown)"); |
274 | snprintf(usr->cwd, PATH_MAX, "(unknown)"); |
275 | 275 | ||
276 | if (1 < cli_psprintf(&usr->prompt, "%s #", usr->cwd)) { |
276 | if (1 < cli_psprintf(&usr->prompt, "%s # ", usr->cwd)) { |
277 | cli_error(cli_errno, "Failed to set prompt"); |
277 | cli_error(cli_errno, "Failed to set prompt"); |
278 | return 1; |
278 | return 1; |
279 | } |
279 | } |
280 | 280 | ||
281 | return 0; |
281 | return 0; |