summaryrefslogtreecommitdiffstats
path: root/login-utils/login.c
diff options
context:
space:
mode:
authorKarel Zak2011-09-13 11:37:32 +0200
committerKarel Zak2011-10-26 23:17:16 +0200
commit721bbc66a50e4fcac1ccaf747095fce8529a6c99 (patch)
tree553bf30d1423da7bd013a95831bcaea3695aba0a /login-utils/login.c
parentlogin: improve hushed mode (merge suse changes) (diff)
downloadkernel-qcow2-util-linux-721bbc66a50e4fcac1ccaf747095fce8529a6c99.tar.gz
kernel-qcow2-util-linux-721bbc66a50e4fcac1ccaf747095fce8529a6c99.tar.xz
kernel-qcow2-util-linux-721bbc66a50e4fcac1ccaf747095fce8529a6c99.zip
login: remove unused code and tests
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/login.c')
-rw-r--r--login-utils/login.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/login-utils/login.c b/login-utils/login.c
index 38b17f5bf..44390b765 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -63,7 +63,6 @@
#include "c.h"
#include "setproctitle.h"
#include "pathnames.h"
-#include "login.h"
#include "strutils.h"
#include "nls.h"
#include "xalloc.h"
@@ -117,6 +116,7 @@ int timeout = LOGIN_TIMEOUT;
static void timedout(int);
static void sigint(int);
static void motd(void);
+static void sleepexit(int eval);
/*
* Nice and simple code provided by Linus Torvalds 16-Feb-93
@@ -661,7 +661,6 @@ static int get_hushlogin_status(struct passwd *pwd)
return 0;
}
-
int main(int argc, char **argv)
{
extern int optind;
@@ -1224,7 +1223,6 @@ int main(int argc, char **argv)
* What I did was add a second timeout while trying to write the message so
* the process just exits if the second timeout expires.
*/
-
static void timedout2(int sig __attribute__ ((__unused__)))
{
struct termios ti;
@@ -1249,7 +1247,7 @@ static void timedout(int sig __attribute__ ((__unused__)))
jmp_buf motdinterrupt;
-void motd(void)
+static void motd(void)
{
int fd, nchars;
void (*oldint) (int);
@@ -1268,14 +1266,14 @@ void motd(void)
close(fd);
}
-void sigint(int sig __attribute__ ((__unused__)))
+static void sigint(int sig __attribute__ ((__unused__)))
{
longjmp(motdinterrupt, 1);
}
/* Should not be called from PAM code... */
-void sleepexit(int eval)
+static void sleepexit(int eval)
{
sleep(LOGIN_EXIT_TIMEOUT);
exit(eval);