diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-05-11 16:36:03 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-05-11 16:36:03 +0000 |
commit | 9d94deabd398634c6d1c601ba276f5afd97b2050 (patch) | |
tree | 962c36aed0e52cd00f6220e5ac542356212b89c8 | |
parent | 238da24620360655588f5a86f45c80f4966fd77d (diff) | |
download | busybox-w32-9d94deabd398634c6d1c601ba276f5afd97b2050.tar.gz busybox-w32-9d94deabd398634c6d1c601ba276f5afd97b2050.tar.bz2 busybox-w32-9d94deabd398634c6d1c601ba276f5afd97b2050.zip |
Use xgetcwd
-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 | } |