diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-15 12:35:14 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-15 12:35:14 +0000 |
commit | 883d4fb97aee5522adc42a2fb660d34077d7ebb0 (patch) | |
tree | aacdb1cc1f6613653f67c6cbc7cd092a3b5d404c /libc/misc/utmp/utent.c | |
parent | 4d40c3c17e5165f646b6cec179e6ac4ab51cc9f1 (diff) |
Add missing updwtmp() and fix broken makefile
Diffstat (limited to 'libc/misc/utmp/utent.c')
-rw-r--r-- | libc/misc/utmp/utent.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c index 2746b0b35..8d816c548 100644 --- a/libc/misc/utmp/utent.c +++ b/libc/misc/utmp/utent.c @@ -134,3 +134,15 @@ int utmpname (const char *new_ut_name) close(ut_fd); return 0; } + +extern void updwtmp(const char *wtmp_file, const struct utmp *ut) +{ + int fd; + + fd = open(wtmp_file, O_APPEND | O_WRONLY, 0); + if (fd >= 0) { + write(fd, (const char *) ut, sizeof(*ut)); + close(fd); + } +} + |