Displaying 1 result from an estimated 1 matches for "ba9a1bc".
2010 Apr 02
1
[PATCH] dash: cd fix getpwd
...gal." Herbert Xu
Use upstream dash way.
Signed-off-by: maximilian attems <max at stro.at>
Cc: Herbert Xu <herbert at gondor.apana.org.au>
---
usr/dash/cd.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/usr/dash/cd.c b/usr/dash/cd.c
index 8a23110..ba9a1bc 100644
--- a/usr/dash/cd.c
+++ b/usr/dash/cd.c
@@ -253,12 +253,13 @@ getpwd()
{
#ifdef __GLIBC__
char *dir = getcwd(0, 0);
+ if (dir)
+ return dir;
#else
char buf[PATH_MAX];
- char *dir = getcwd(buf, sizeof(buf));
+ if(getcwd(buf, sizeof(buf)))
+ return savestr(buf);
#endif
- if (dir)
-...