Skip to contentSkip to conversation

tty: fill console_driver->driver_name

PATCH In review Cheng Chao 2 participants 3 messages Nov 7, 2019 – Nov 12, 2019 TTY layer and serial drivers

lore
Share & tools
lore

Cheng Chao

author
#0 lore raw

PATCH 1/1 tty: fill console_driver->driver_name

cat /proc/tty/drivers
...
unknown /dev/tty 4 1-63 console

----------------------------------
after this patch:

cat /proc/tty/drivers
...
console /dev/tty 4 1-63 console

---
 drivers/tty/vt/vt.c | 1 +
 1 file changed, 1 insertion(+)
drivers/tty/vt/vt.c +1 -0
index 34aa39d..981eee9 100644
@@ -3440,6 +3440,7 @@ int __init vty_init(const struct file_operations *console_fops)
 	if (!console_driver)
 		panic("Couldn't allocate console driver\n");
 
+	console_driver->driver_name = "console";
 	console_driver->name = "tty";
 	console_driver->name_base = 1;
 	console_driver->major = TTY_MAJOR;
Signature · 1 line
2.4.11
maintainer
#1 lore raw
Quoted 10 lines · Cheng Chao

cat /proc/tty/drivers
...
unknown /dev/tty 4 1-63 console

----------------------------------
after this patch:

cat /proc/tty/drivers
...
console /dev/tty 4 1-63 console

What is going to break with this change? It's a user visable thing, why does it need to be changed?

thanks,

greg k-h

author
#2 lore raw

Thank greg k-h.
1. I guess nothing is going to break with this change, I'm not sure about that
2. why does it need to be changed?
"unknown" confuse us a little, and we want to know the reason: bug
or some else.
In fact, it is a known tty driver.
3. finally, I also consider this patch is trivial, but I just expect "cat /proc/tty/drivers" to be better.

thanks,
Cheng

Quoted 19 lines · Greg KH
Quoted 10 lines · Cheng Chao

cat /proc/tty/drivers
...
unknown /dev/tty 4 1-63 console

----------------------------------
after this patch:

cat /proc/tty/drivers
...
console /dev/tty 4 1-63 console

What is going to break with this change? It's a user visable thing, why does it need to be changed?

thanks,

greg k-h