/* * This function is called by tty_register_driver() to handle * registering the driver's /proc handler into /proc/tty/driver/<foo>
*/ void proc_tty_register_driver(struct tty_driver *driver)
{ struct proc_dir_entry *ent;
if (!driver->driver_name || driver->proc_entry ||
!driver->ops->proc_show) return;
/* * This function is called by tty_unregister_driver()
*/ void proc_tty_unregister_driver(struct tty_driver *driver)
{ struct proc_dir_entry *ent;
ent = driver->proc_entry; if (!ent) return;
remove_proc_entry(ent->name, proc_tty_driver);
driver->proc_entry = NULL;
}
/* * Called by proc_root_init() to initialize the /proc/tty subtree
*/ void __init proc_tty_init(void)
{ if (!proc_mkdir("tty", NULL)) return;
proc_mkdir("tty/ldisc", NULL); /* Preserved: it's userspace visible */ /* * /proc/tty/driver/serial reveals the exact character counts for * serial links which is just too easy to abuse for inferring * password lengths and inter-keystroke timings during password * entry.
*/
proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR|S_IXUSR, NULL);
proc_create_seq("tty/ldiscs", 0, NULL, &tty_ldiscs_seq_ops);
proc_create_seq("tty/drivers", 0, NULL, &tty_drivers_op);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.