diff options
| -rw-r--r-- | hush.c | 4 | ||||
| -rw-r--r-- | shell/hush.c | 4 |
2 files changed, 4 insertions, 4 deletions
| @@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child) | |||
| 428 | printf("cd: %s: %s\n", newdir, strerror(errno)); | 428 | printf("cd: %s: %s\n", newdir, strerror(errno)); |
| 429 | return EXIT_FAILURE; | 429 | return EXIT_FAILURE; |
| 430 | } | 430 | } |
| 431 | getcwd(cwd, sizeof(char)*MAX_LINE); | 431 | cwd = xgetcwd(cwd); |
| 432 | return EXIT_SUCCESS; | 432 | return EXIT_SUCCESS; |
| 433 | } | 433 | } |
| 434 | 434 | ||
| @@ -567,7 +567,7 @@ static int builtin_jobs(struct child_prog *child) | |||
| 567 | /* built-in 'pwd' handler */ | 567 | /* built-in 'pwd' handler */ |
| 568 | static int builtin_pwd(struct child_prog *dummy) | 568 | static int builtin_pwd(struct child_prog *dummy) |
| 569 | { | 569 | { |
| 570 | getcwd(cwd, MAX_LINE); | 570 | cwd = xgetcwd(cwd); |
| 571 | puts(cwd); | 571 | puts(cwd); |
| 572 | return EXIT_SUCCESS; | 572 | return EXIT_SUCCESS; |
| 573 | } | 573 | } |
diff --git a/shell/hush.c b/shell/hush.c index d0b30ebac..abc8f6e60 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child) | |||
| 428 | printf("cd: %s: %s\n", newdir, strerror(errno)); | 428 | printf("cd: %s: %s\n", newdir, strerror(errno)); |
| 429 | return EXIT_FAILURE; | 429 | return EXIT_FAILURE; |
| 430 | } | 430 | } |
| 431 | getcwd(cwd, sizeof(char)*MAX_LINE); | 431 | cwd = xgetcwd(cwd); |
| 432 | return EXIT_SUCCESS; | 432 | return EXIT_SUCCESS; |
| 433 | } | 433 | } |
| 434 | 434 | ||
| @@ -567,7 +567,7 @@ static int builtin_jobs(struct child_prog *child) | |||
| 567 | /* built-in 'pwd' handler */ | 567 | /* built-in 'pwd' handler */ |
| 568 | static int builtin_pwd(struct child_prog *dummy) | 568 | static int builtin_pwd(struct child_prog *dummy) |
| 569 | { | 569 | { |
| 570 | getcwd(cwd, MAX_LINE); | 570 | cwd = xgetcwd(cwd); |
| 571 | puts(cwd); | 571 | puts(cwd); |
| 572 | return EXIT_SUCCESS; | 572 | return EXIT_SUCCESS; |
| 573 | } | 573 | } |
