From ab050f5522e843bf08994685134adaaac7ffd392 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 27 Jan 2001 06:01:43 +0000 Subject: Add in a patch to make busybox use the normal pwd.h and grp.h functions. Add in simple implementations of these functions, which can, optionally, be used instead of the system versions. -Erik --- shell/cmdedit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'shell') diff --git a/shell/cmdedit.c b/shell/cmdedit.c index c2b4123db..e043d5f52 100644 --- a/shell/cmdedit.c +++ b/shell/cmdedit.c @@ -54,10 +54,6 @@ #include #endif -#ifdef BB_FEATURE_USERNAME_COMPLETION -#include -#endif - static const int MAX_HISTORY = 15; /* Maximum length of the linked list for the command line history */ enum { @@ -354,10 +350,10 @@ static char** username_tab_completion(char *ud, int *num_matches) char *temp; int nm = 0; - setpwent (); + bb_setpwent (); userlen = strlen (ud + 1); - while ((entry = getpwent ()) != NULL) { + while ((entry = bb_getpwent ()) != NULL) { /* Null usernames should result in all users as possible completions. */ if (!userlen || !strncmp (ud + 1, entry->pw_name, userlen)) { @@ -369,7 +365,7 @@ static char** username_tab_completion(char *ud, int *num_matches) } } - endpwent (); + bb_endpwent (); (*num_matches) = nm; return (matches); } -- cgit v1.2.3