Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv27270
Modified Files:
keyboard.c sysrq.c tty_io.c vt_ioctl.c
Log Message:
Fixes and updates.
Index: keyboard.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- keyboard.c 9 Apr 2002 20:51:26 -0000 1.76
+++ keyboard.c 2 Aug 2002 14:58:50 -0000 1.77
@@ -58,8 +58,6 @@
static void kbd_disconnect(struct input_handle *handle);
extern void ctrl_alt_del(void);
-#define SIZE(x) (sizeof(x)/sizeof((x)[0]))
-
/*
* Exported functions/variables
*/
@@ -99,11 +97,11 @@
/* maximum values each key_handler can handle */
const int max_vals[] = {
- 255, SIZE(func_table) - 1, SIZE(fn_handler) - 1, NR_PAD - 1,
+ 255, ARRAY_SIZE(func_table) - 1, ARRAY_SIZE(fn_handler) - 1, NR_PAD - 1,
NR_DEAD - 1, 255, 3, NR_SHIFT - 1, 255, NR_ASCII - 1, NR_LOCK - 1,
255, 2*NR_LOCK - 1, 255
};
-const int NR_TYPES = SIZE(max_vals);
+const int NR_TYPES = ARRAY_SIZE(max_vals);
int spawnpid, spawnsig;
@@ -278,7 +276,7 @@
shift_state = 0;
memset(shift_down, 0, sizeof(shift_down));
- for (i = 0; i < SIZE(key_down); i++) {
+ for (i = 0; i < ARRAY_SIZE(key_down); i++) {
if (!key_down[i])
continue;
@@ -528,7 +526,7 @@
{
if (up_flag)
return;
- if (value >= SIZE(fn_handler))
+ if (value >= ARRAY_SIZE(fn_handler))
return;
if ((vc->kbd_table.kbdmode == VC_RAW ||
vc->kbd_table.kbdmode == VC_MEDIUMRAW) &&
@@ -593,7 +591,7 @@
{
if (up_flag)
return;
- if (value < SIZE(func_table)) {
+ if (value < ARRAY_SIZE(func_table)) {
if (func_table[value])
puts_queue(vc, func_table[value]);
} else
Index: sysrq.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- sysrq.c 18 Jun 2002 18:51:55 -0000 1.22
+++ sysrq.c 2 Aug 2002 14:58:50 -0000 1.23
@@ -68,7 +68,7 @@
if (tty)
do_SAK(tty);
- if ((tty->driver.subtype == SYSTEM_TYPE_CONSOLE) && vc)
+ if ((tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) && vc)
reset_vc(vc->display_fg->fg_console);
}
static struct sysrq_key_op sysrq_SAK_op = {
@@ -85,7 +85,7 @@
{
struct vc_data *vc = (struct vc_data *) tty->driver_data;
- if ((tty->driver.subtype == SYSTEM_TYPE_CONSOLE) && vc)
+ if ((tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) && vc)
vc->kbd_table.kbdmode = VC_XLATE;
}
static struct sysrq_key_op sysrq_unraw_op = {
Index: tty_io.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- tty_io.c 10 Jul 2002 18:08:03 -0000 1.51
+++ tty_io.c 2 Aug 2002 14:58:50 -0000 1.52
@@ -1486,7 +1486,7 @@
if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg)))
return 0;
#ifdef CONFIG_VT
- if (tty->driver.subtype == SYSTEM_TYPE_CONSOLE) {
+ if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
struct vc_data *vc = (struct vc_data *) tty->driver_data;
if (!vc || vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row))
Index: vt_ioctl.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt_ioctl.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- vt_ioctl.c 27 Jul 2002 19:33:27 -0000 1.68
+++ vt_ioctl.c 2 Aug 2002 14:58:50 -0000 1.69
@@ -357,6 +357,7 @@
* structure so we wont have to convert the fontdata all the time.
* /Jes
*/
+
#define max_font_size 65536
int con_font_op(struct vc_data *vc, struct console_font_op *op)
@@ -568,10 +569,10 @@
case PIO_UNIMAP:
if (!perm)
return -EPERM;
- return con_set_unimap(vc->display_fg->fg_console,
+ return con_set_unimap(vc,
tmp.entry_ct, tmp.entries);
case GIO_UNIMAP:
- return con_get_unimap(vc->display_fg->fg_console,
+ return con_get_unimap(vc,
tmp.entry_ct, &(user_ud->entry_ct),
tmp.entries);
}
|