From d6cfdd73bbd557e668fca76925d778849295f402 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 26 Sep 2003 07:22:37 +0000 Subject: [PATCH] Add a cn_unit and cn_name field to the consdev structure. Most of the actual use of the cn_dev field is merely to get the name, and most of the actual initializations are bogusly using makedev() because the probe/attach has not been completed. Instead we will migrate console drivers to fill in the name and if the driver needs it: the unit number, thereby avoiding the bogus calls to makedev(). --- sys/sys/cons.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/cons.h b/sys/sys/cons.h index ee4fed71ede0..e4ecfb2c946e 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -70,6 +70,8 @@ struct consdev { dev_t cn_dev; /* major/minor of device */ short cn_pri; /* pecking order; the higher the better */ void *cn_arg; /* drivers method argument */ + int cn_unit; /* some drivers prefer this */ + char cn_name[SPECNAMELEN + 1]; /* console (device) name */ }; /* values for cn_pri - reflect our policy for console selection */