summaryrefslogtreecommitdiffstats
path: root/term-utils/agetty.c
diff options
context:
space:
mode:
authorSami Kerola2017-07-30 14:44:05 +0200
committerSami Kerola2017-08-05 10:58:25 +0200
commit43a1709e3b8f206799fbd1932a61268ac0042ecc (patch)
tree268b7152c0329b4df62d3fedd855244b364758d8 /term-utils/agetty.c
parentbash-completion: look for look completions (diff)
downloadkernel-qcow2-util-linux-43a1709e3b8f206799fbd1932a61268ac0042ecc.tar.gz
kernel-qcow2-util-linux-43a1709e3b8f206799fbd1932a61268ac0042ecc.tar.xz
kernel-qcow2-util-linux-43a1709e3b8f206799fbd1932a61268ac0042ecc.zip
agetty: remove dead DO_DEVFS_FIDDLING code segment
There is no ./configure option to enable this, and it is unlikely any distribution hot patching to enable fiddling when building package. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils/agetty.c')
-rw-r--r--term-utils/agetty.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index cc0cc3f62..a95da6f3d 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -829,45 +829,6 @@ static void parse_args(int argc, char **argv, struct options *op)
if (argc > optind && argv[optind])
op->term = argv[optind];
-#ifdef DO_DEVFS_FIDDLING
- /*
- * Some devfs junk, following Goswin Brederlow:
- * turn ttyS<n> into tts/<n>
- * turn tty<n> into vc/<n>
- * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=72241
- */
- if (op->tty && strlen(op->tty) < 90) {
- char dev_name[100];
- struct stat st;
-
- if (strncmp(op->tty, "ttyS", 4) == 0) {
- strcpy(dev_name, "/dev/");
- strcat(dev_name, op->tty);
- if (stat(dev_name, &st) < 0) {
- strcpy(dev_name, "/dev/tts/");
- strcat(dev_name, op->tty + 4);
- if (stat(dev_name, &st) == 0) {
- op->tty = strdup(dev_name + 5);
- if (!op->tty)
- log_err(_("failed to allocate memory: %m"));
- }
- }
- } else if (strncmp(op->tty, "tty", 3) == 0) {
- strcpy(dev_name, "/dev/");
- strncat(dev_name, op->tty, 90);
- if (stat(dev_name, &st) < 0) {
- strcpy(dev_name, "/dev/vc/");
- strcat(dev_name, op->tty + 3);
- if (stat(dev_name, &st) == 0) {
- op->tty = strdup(dev_name + 5);
- if (!op->tty)
- log_err(_("failed to allocate memory: %m"));
- }
- }
- }
- }
-#endif /* DO_DEVFS_FIDDLING */
-
debug("exiting parseargs\n");
}