From 81580f79fa4b96b24a7db67815e7ffa7d3e2d42c Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Thu, 1 Dec 2016 09:52:10 +0100 Subject: agetty: remove obsolete HAVE_UPDWTMP fallback Signed-off-by: Ruediger Meier --- term-utils/agetty.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'term-utils/agetty.c') diff --git a/term-utils/agetty.c b/term-utils/agetty.c index dbf499ef5..0f114a532 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -951,25 +950,7 @@ static void update_utmp(struct options *op) pututline(&ut); endutent(); - { -#ifdef HAVE_UPDWTMP - updwtmp(_PATH_WTMP, &ut); -#else - int ut_fd; - int lf; - - if ((lf = open(_PATH_WTMPLOCK, O_CREAT | O_WRONLY, 0660)) >= 0) { - flock(lf, LOCK_EX); - if ((ut_fd = - open(_PATH_WTMP, O_APPEND | O_WRONLY)) >= 0) { - write_all(ut_fd, &ut, sizeof(ut)); - close(ut_fd); - } - flock(lf, LOCK_UN); - close(lf); - } -#endif /* HAVE_UPDWTMP */ - } + updwtmp(_PATH_WTMP, &ut); } #endif /* SYSV_STYLE */ -- cgit v1.2.3-55-g7522