patch-2.1.112 linux/drivers/char/vt.c

Next file: linux/drivers/misc/parport_procfs.c
Previous file: linux/drivers/char/vc_screen.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.111/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -113,21 +113,18 @@
 }
 
 /*
- * Generates sound of some count for some number of clock ticks
- * [count = 1193180 / frequency]
+ * Generates sound of some frequency for some number of clock ticks
  *
  * If freq is 0, will turn off sound, else will turn it on for that time.
  * If msec is 0, will return immediately, else will sleep for msec time, then
  * turn sound off.
  *
- * We use the BEEP_TIMER vector since we're using the same method to
- * generate sound, and we'll overwrite any beep in progress. That may
- * be something to fix later, if we like.
- *
  * We also return immediately, which is what was implied within the X
  * comments - KDMKTONE doesn't put the process to sleep.
  */
-/* FIXME: This should go to arch-dependent code */
+
+#if defined(__i386__) || defined(__alpha__) || defined(__powerpc__) || defined(__mips__)
+
 static void
 kd_nosound(unsigned long ignored)
 {
@@ -168,6 +165,15 @@
 	return;
 }
 
+#else
+
+void
+_kd_mksound(unsigned int hz, unsigned int ticks)
+{
+}
+
+#endif
+
 void (*kd_mksound)(unsigned int hz, unsigned int ticks) = _kd_mksound;
 
 
@@ -394,8 +400,6 @@
 		op.data = cfdarg.chardata;
 		return con_font_op(fg_console, &op);
 	case GIO_FONTX: {
-		if (!cfdarg.chardata)
-			return 0;
 		op.op = KD_FONT_OP_GET;
 		op.flags = 0;
 		op.width = 8;
@@ -432,9 +436,9 @@
 	case PIO_UNIMAP:
 		if (!perm)
 			return -EPERM;
-		return con_set_unimap(tmp.entry_ct, tmp.entries);
+		return con_set_unimap(fg_console, tmp.entry_ct, tmp.entries);
 	case GIO_UNIMAP:
-		return con_get_unimap(tmp.entry_ct, &(user_ud->entry_ct), tmp.entries);
+		return con_get_unimap(fg_console, tmp.entry_ct, &(user_ud->entry_ct), tmp.entries);
 	}
 	return 0;
 }
@@ -994,11 +998,11 @@
 #else
 		{
 		struct console_font_op op;
-		op.op = KD_FONT_SET_DEFAULT;
+		op.op = KD_FONT_OP_SET_DEFAULT;
 		op.data = NULL;
 		i = con_font_op(fg_console, &op);
 		if (i) return i;
-		con_set_default_unimap();
+		con_set_default_unimap(fg_console);
 		return 0;
 		}
 #endif
@@ -1010,6 +1014,7 @@
 			return -EFAULT;
 		if (!perm && op.op != KD_FONT_OP_GET)
 			return -EPERM;
+		op.flags |= KD_FONT_FLAG_NEW;
 		i = con_font_op(console, &op);
 		if (i) return i;
 		if (copy_to_user((void *) arg, &op, sizeof(op)))
@@ -1039,7 +1044,7 @@
 			return -EPERM;
 		i = copy_from_user(&ui, (void *)arg, sizeof(struct unimapinit));
 		if (i) return -EFAULT;
-		con_clear_unimap(&ui);
+		con_clear_unimap(fg_console, &ui);
 		return 0;
 	      }
 
@@ -1189,10 +1194,6 @@
 {
 	unsigned char old_vc_mode;
 
-        if ((new_console == fg_console) || (vt_dont_switch))
-                return;
-        if (!vc_cons_allocated(new_console))
-                return;
 	last_console = fg_console;
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov