[ tty driver name breakage ]
Richard, can we please get this wrapped up?
My preferred approach is to change the driver naming scheme
so that we don't have to put printf control-strings everywhere.
We can remove a number of ifdefs that way.
So for serial.c:
--- linux-2.4.18-pre2/drivers/char/tty_io.c Mon Jan 7 16:48:02 2002
+++ linux-akpm/drivers/char/tty_io.c Mon Jan 7 20:56:38 2002
@@ -193,10 +193,13 @@ _tty_make_name(struct tty_struct *tty, c
if (!tty) /* Hmm. NULL pointer. That's fun. */
strcpy(buf, "NULL tty");
- else
- sprintf(buf, name,
- idx + tty->driver.name_base);
-
+ else {
+#ifdef CONFIG_DEVFS_FS
+ sprintf(buf, "%s/%d", name, idx + tty->driver.name_base);
+#else
+ sprintf(buf, "%s%d", name, idx + tty->driver.name_base);
+#endif
+ }
return buf;
}
--- linux-2.4.18-pre2/drivers/char/serial.c Mon Jan 7 16:48:02 2002
+++ linux-akpm/drivers/char/serial.c Mon Jan 7 20:58:09 2002
@@ -5387,7 +5387,7 @@ static int __init rs_init(void)
serial_driver.driver_name = "serial";
#endif
#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
- serial_driver.name = "tts/%d";
+ serial_driver.name = "tts";
#else
serial_driver.name = "ttyS";
#endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: Serial Driver Name Question (kernels 2.4.x)David Weinehall <tao _at_ acc.umu.se>
- Re: Serial Driver Name Question (kernels 2.4.x)Ivan Passos <ivan _at_ cyclades.com>
- Re: Serial Driver Name Question (kernels 2.4.x)Andrew Morton <akpm _at_ zip.com.au>
- Re: Serial Driver Name Question (kernels 2.4.x)Richard Gooch <rgooch _at_ ras.ucalgary.ca>
- Re: Serial Driver Name Question (kernels 2.4.x)Richard Gooch <rgooch _at_ ras.ucalgary.ca>
- Prev by Date: Re: [s-h] Re: ALSA patch for 2.5.2pre9 kernel
- Next by Date: Re: [2.4.17/18pre] VM and swap - it's really unusable
- Previous by thread: Re: Serial Driver Name Question (kernels 2.4.x)
- Next by thread: Re: Serial Driver Name Question (kernels 2.4.x)
- Indexes:[Main][Thread]