From 53b5f21c9c453ff74c9aabdecd166a5e6ddb202b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 7 Dec 2005 16:09:49 +0000 Subject: Hide more --- libc/misc/utmp/utent.c | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'libc/misc/utmp/utent.c') diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index e03d4528f..374b53b93 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -37,29 +37,7 @@ static struct utmp static_utmp; static const char default_file_name[] = _PATH_UTMP; static const char *static_ut_name = (const char *) default_file_name; - - -static struct utmp *__getutent(int utmp_fd) - -{ - if (utmp_fd == -1) { - setutent(); - } - if (utmp_fd == -1) { - return NULL; - } - - LOCK; - if (__read(utmp_fd, (char *) &static_utmp, sizeof(struct utmp)) != sizeof(struct utmp)) - { - return NULL; - } - - UNLOCK; - return &static_utmp; -} - -void setutent(void) +void attribute_hidden __setutent(void) { int ret; @@ -87,6 +65,26 @@ bummer: UNLOCK; return; } +strong_alias(__setutent,setutent) + +static struct utmp *__getutent(int utmp_fd) +{ + if (utmp_fd == -1) { + __setutent(); + } + if (utmp_fd == -1) { + return NULL; + } + + LOCK; + if (__read(utmp_fd, (char *) &static_utmp, sizeof(struct utmp)) != sizeof(struct utmp)) + { + return NULL; + } + + UNLOCK; + return &static_utmp; +} void endutent(void) { @@ -148,8 +146,6 @@ struct utmp *getutline(const struct utmp *utmp_entry) return NULL; } -extern struct utmp *__getutid (__const struct utmp *__id) attribute_hidden; - struct utmp *pututline (const struct utmp *utmp_entry) { LOCK; @@ -190,4 +186,3 @@ int utmpname (const char *new_ut_name) UNLOCK; return 0; } - -- cgit v1.2.3