]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: clean up includes in agetty.c
authorKarel Zak <kzak@redhat.com>
Thu, 14 May 2026 10:03:39 +0000 (12:03 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 14 May 2026 11:15:16 +0000 (13:15 +0200)
Remove headers that are no longer needed after splitting functions
to separate files. Sort remaining includes alphabetically.

Signed-off-by: Karel Zak <kzak@redhat.com>
agetty-cmd/agetty.c
include/logindefs.h

index 3b186abf418b23d88558b4944c7ba1b1abf5e18f..1ec1a20d1559e54cb6c4cd28368fd348c7db0a45 100644 (file)
  * it what you wish.
  */
 
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <termios.h>
-#include <signal.h>
+#include <ctype.h>
 #include <errno.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
 #include <fcntl.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <utmpx.h>
 #include <getopt.h>
-#include <time.h>
-#include <sys/socket.h>
-#include <langinfo.h>
-#include <grp.h>
-#include <pwd.h>
 #include <netdb.h>
-#include <sys/utsname.h>
-#include <syslog.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <termios.h>
 
 #include "agetty.h"
-#include "strutils.h"
 #include "all-io.h"
+#include "c.h"
+#include "logindefs.h"
 #include "nls.h"
 #include "pathnames.h"
-#include "c.h"
-#include "cctype.h"
+#include "strutils.h"
 #include "widechar.h"
-#include "ttyutils.h"
-#include "color-names.h"
-#include "env.h"
-#include "path.h"
-#include "fileutils.h"
-
-#include "logindefs.h"
-
-#ifdef USE_PLYMOUTH_SUPPORT
-# include "plymouth-ctrl.h"
-#endif
-
-#ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-#endif
-
-#ifdef HAVE_GETTTYNAM
-# include <ttyent.h>
-#endif
-
-#if defined(__FreeBSD_kernel__)
-# include <pty.h>
-# ifdef HAVE_UTMP_H
-#  include <utmp.h>
-# endif
-# ifdef HAVE_LIBUTIL_H
-#  include <libutil.h>
-# endif
-#endif
-
-#ifdef USE_SYSTEMD
-# include <systemd/sd-daemon.h>
-# include <systemd/sd-login.h>
-#endif
-
-#ifdef __linux__
-#  include <sys/kd.h>
-#endif
 
 
 /* Login prompt. */
index 35d65621e9b9ded9e0099395125340a11a7a45a5..fc8f81d079d5163473f344108265dce10c7d8b2f 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef UTIL_LINUX_LOGINDEFS_H
 #define UTIL_LINUX_LOGINDEFS_H
 
+#include <pwd.h>
+
 extern void logindefs_load_file(const char *filename);
 extern void logindefs_set_loader(void (*loader)(void *data), void *data);
 extern int getlogindefs_bool(const char *name, int dflt);