aboutsummaryrefslogtreecommitdiff
path: root/shell/lash.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-02-11 16:19:28 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-02-11 16:19:28 +0000
commit6ca0444420223c224162674902d4f6e4e093962d (patch)
treec13da1537be3327e041fac86d9fdce68de70298a /shell/lash.c
parent136f42f503cb3e9588e62332d043e92b7475ec4e (diff)
downloadbusybox-6ca0444420223c224162674902d4f6e4e093962d.tar.gz
syslogd: fix "readpath bug" by using readlink instead
libbb: rename xgetcwd and xreadlink
Diffstat (limited to 'shell/lash.c')
-rw-r--r--shell/lash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/lash.c b/shell/lash.c
index 502e0d829..09067fda0 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -217,7 +217,7 @@ static int builtin_cd(struct child_prog *child)
bb_perror_msg("cd: %s", newdir);
return EXIT_FAILURE;
}
- cwd = xgetcwd((char *)cwd);
+ cwd = xrealloc_getcwd_or_warn((char *)cwd);
if (!cwd)
cwd = bb_msg_unknown;
return EXIT_SUCCESS;
@@ -342,7 +342,7 @@ static int builtin_jobs(struct child_prog *child)
/* built-in 'pwd' handler */
static int builtin_pwd(struct child_prog ATTRIBUTE_UNUSED *dummy)
{
- cwd = xgetcwd((char *)cwd);
+ cwd = xrealloc_getcwd_or_warn((char *)cwd);
if (!cwd)
cwd = bb_msg_unknown;
puts(cwd);
@@ -1569,7 +1569,7 @@ int lash_main(int argc_l, char **argv_l)
}
/* initialize the cwd -- this is never freed...*/
- cwd = xgetcwd(0);
+ cwd = xrealloc_getcwd_or_warn(NULL);
if (!cwd)
cwd = bb_msg_unknown;