This doesn't cover all the drivers, because the definition for devfs
is that the standard serial "translates" 'ttyS' to 'tts/', and other
serial drivers "translate" 'ttyN' (where 'N' can be several
different letters -- e.g. 'C' for Cyclades, 'R' for Comtrol, 'X' for
Specialix, 'D' for Digi, etc.) to 'tts/N' (so that standard serial
and other serial devices can share the same devfs directory).
So, I believe the best way to solve this would be:
drivers/char/tty_io.c:
@@ -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);
+ sprintf(buf, "%s%d", name, idx + tty->driver.name_base);
return buf;
}
drivers/char/serial.c:
@@ -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
And then, for instance, for the Cyclades driver, we'd use:
#ifdef CONFIG_DEVFS_FS
cy_serial_driver.name = "tts/C";
#else
cy_serial_driver.name = "ttyC";
#endif
, and let's not forget the callout devices (which follow a similar
rule):
#ifdef CONFIG_DEVFS_FS
cy_callout_driver.name = "cua/C";
#else
cy_callout_driver.name = "cub";
#endif
This would apply for other drivers as well, just replacing the 'C'
by the proper letter.
So, what do you think?!?!?
Later,
-- Ivan Passos -o) Integration Manager, Cyclades - http://www.cyclades.com /\\ Project Leader, NetLinOS - http://www.netlinos.org _\_V -------------------------------------------------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/