]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: remove dead DO_DEVFS_FIDDLING code segment
authorSami Kerola <kerolasa@iki.fi>
Sun, 30 Jul 2017 12:44:05 +0000 (13:44 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 5 Aug 2017 08:58:25 +0000 (09:58 +0100)
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>
term-utils/agetty.c

index cc0cc3f620e4485cbd36578db3d8b76bf3e0efd8..a95da6f3da36bbfcc39ac0303d0e9050d696d81f 100644 (file)
@@ -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");
 }