|
From: Aivils S. <ai...@us...> - 2003-10-28 09:12:57
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char
In directory sc8-pr-cvs1:/tmp/cvs-serv18410/ruby-2.6/drivers/char
Modified Files:
consolemap.c keyboard.c vt.c vt_proc.c
Removed Files:
n_tty.c
Log Message:
vt_list instead vt_cons for future release_vt()
Index: consolemap.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/consolemap.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- consolemap.c 12 Sep 2003 08:33:21 -0000 1.2
+++ consolemap.c 28 Oct 2003 07:14:53 -0000 1.3
@@ -667,7 +667,7 @@
void __init
console_map_init(void)
{
- struct vt_struct *vt = vt_cons;
+ struct vt_struct *vt = (struct vt_struct *) vt_list.prev;
int i;
for (i = 0; i < vt->vc_count; i++) {
@@ -677,3 +677,6 @@
con_set_default_unimap(vc);
}
}
+
+EXPORT_SYMBOL(con_copy_unimap);
+
Index: keyboard.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- keyboard.c 15 Oct 2003 06:27:55 -0000 1.7
+++ keyboard.c 28 Oct 2003 07:14:53 -0000 1.8
@@ -969,7 +969,6 @@
void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down)
{
struct vc_data *vc = vt->fg_console;
- struct input_handle *handle = vt->keyboard;
unsigned short keysym, *key_map;
unsigned char type, raw_mode;
struct tty_struct *tty;
@@ -1113,7 +1112,7 @@
struct input_dev *dev,
struct input_device_id *id)
{
- struct vt_struct *vt = vt_cons;
+ struct vt_struct *vt;
struct input_handle *handle;
int i;
@@ -1141,11 +1140,7 @@
* have one.
*/
if (i != BTN_MISC) {
- while (vt) {
- if (vt->next && !vt->next->keyboard) {
- vt = vt->next;
- continue;
- }
+ list_for_each_entry (vt, &vt_list, node) {
if (!vt->keyboard) {
vt->keyboard = handle;
handle->private = vt;
@@ -1158,7 +1153,6 @@
}
break;
}
- vt = vt->next;
}
kbd_refresh_leds(handle);
}
Index: vt.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- vt.c 15 Oct 2003 06:27:55 -0000 1.8
+++ vt.c 28 Oct 2003 07:14:53 -0000 1.9
@@ -135,7 +135,7 @@
static unsigned int current_vc; /* Which /dev/vc/X to allocate next */
static unsigned int current_vt; /* Which VT to allocate next */
struct vt_struct *admin_vt; /* Administrative VT */
-struct vt_struct *vt_cons; /* Head to link list of VTs */
+LIST_HEAD(vt_list); /* Head to link list of VTs */
static void vt_flush_chars(struct tty_struct *tty);
static void unblank_screen_t(unsigned long dummy);
@@ -811,11 +811,10 @@
*/
void unblank_screen(void)
{
- struct vt_struct *vt = vt_cons;
+ struct vt_struct *vt;
- while(vt) {
+ list_for_each_entry (vt, &vt_list, node) {
unblank_vt(vt);
- vt = vt->next;
}
}
@@ -940,7 +939,7 @@
{
struct vt_struct *vt;
- for (vt = vt_cons; vt != NULL; vt = vt->next) {
+ list_for_each_entry (vt, &vt_list, node) {
if ((currcons < vt->first_vc + vt->vc_count) &&
currcons >= vt->first_vc)
return vt->vc_cons[currcons - vt->first_vc];
@@ -951,7 +950,7 @@
struct vc_data *vc_allocate(unsigned int currcons)
{
struct vc_data *vc = NULL;
- struct vt_struct *vt = vt_cons;
+ struct vt_struct *vt;
if (currcons >= MAX_NR_CONSOLES) {
currcons = -ENXIO;
@@ -964,7 +963,7 @@
return NULL;
}
- for (vt = vt_cons; vt != NULL; vt = vt->next) {
+ list_for_each_entry (vt, &vt_list, node) {
if (currcons < vt->first_vc + vt->vc_count &&
currcons >= vt->first_vc)
goto found_pool;
@@ -1743,8 +1742,7 @@
vt->vt_num = current_vt;
vt->first_vc = current_vc;
vt->vc_count = vc_count;
- vt->next = vt_cons;
- vt_cons = vt;
+ list_add_tail(&vt->node, &vt_list);
vt->vt_dont_switch = 0;
vt->scrollback_delta = 0;
vt->vt_blanked = 0;
@@ -1820,7 +1818,7 @@
int __init vty_init(void)
{
- if (!vt_cons)
+ if (!vt_list.prev)
return -ENXIO;
console_driver = alloc_tty_driver(MAX_NR_CONSOLES);
@@ -1924,5 +1922,10 @@
EXPORT_SYMBOL(default_blu);
EXPORT_SYMBOL(vc_resize);
EXPORT_SYMBOL(console_blank_hook);
-EXPORT_SYMBOL(vt_cons);
+EXPORT_SYMBOL(vt_list);
EXPORT_SYMBOL(take_over_console);
+EXPORT_SYMBOL(update_region);
+EXPORT_SYMBOL(update_screen);
+EXPORT_SYMBOL(vt_map_display);
+EXPORT_SYMBOL(admin_vt);
+EXPORT_SYMBOL(find_vc);
Index: vt_proc.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_proc.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- vt_proc.c 16 Sep 2003 06:54:42 -0000 1.1
+++ vt_proc.c 28 Oct 2003 07:14:53 -0000 1.2
@@ -176,12 +176,11 @@
int __init vt_proc_init(void)
{
- struct vt_struct *vt=vt_cons;
- if (vt) {
+ struct vt_struct *vt;
+ if (vt_list.prev) {
proc_bus_console_dir = proc_mkdir(VT_PROC_DIR, proc_bus);
- while(vt) {
+ list_for_each_entry (vt, &vt_list, node) {
vt_proc_attach(vt);
- vt=vt->next;
}
}
return 0;
--- n_tty.c DELETED ---
|