From 9d94deabd398634c6d1c601ba276f5afd97b2050 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 11 May 2001 16:36:03 +0000 Subject: [PATCH] Use xgetcwd --- hush.c | 4 ++-- shell/hush.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hush.c b/hush.c index d0b30ebac..abc8f6e60 100644 --- a/hush.c +++ b/hush.c @@ -428,7 +428,7 @@ static int builtin_cd(struct child_prog *child) printf("cd: %s: %s\n", newdir, strerror(errno)); return EXIT_FAILURE; } - getcwd(cwd, sizeof(char)*MAX_LINE); + cwd = xgetcwd(cwd); return EXIT_SUCCESS; } @@ -567,7 +567,7 @@ static int builtin_jobs(struct child_prog *child) /* built-in 'pwd' handler */ static int builtin_pwd(struct child_prog *dummy) { - getcwd(cwd, MAX_LINE); + cwd = xgetcwd(cwd); puts(cwd); return EXIT_SUCCESS; } 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) printf("cd: %s: %s\n", newdir, strerror(errno)); return EXIT_FAILURE; } - getcwd(cwd, sizeof(char)*MAX_LINE); + cwd = xgetcwd(cwd); return EXIT_SUCCESS; } @@ -567,7 +567,7 @@ static int builtin_jobs(struct child_prog *child) /* built-in 'pwd' handler */ static int builtin_pwd(struct child_prog *dummy) { - getcwd(cwd, MAX_LINE); + cwd = xgetcwd(cwd); puts(cwd); return EXIT_SUCCESS; } -- 2.25.1