patch-2.1.123 linux/drivers/char/consolemap.c

Next file: linux/drivers/char/esp.c
Previous file: linux/drivers/char/console_macros.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.122/linux/drivers/char/consolemap.c linux/drivers/char/consolemap.c
@@ -576,6 +576,24 @@
 }
 
 int
+con_copy_unimap(int dstcon, int srccon)
+{
+	struct vc_data *sconp = vc_cons[srccon].d;
+	struct vc_data *dconp = vc_cons[dstcon].d;
+	struct uni_pagedir *q;
+	
+	if (!vc_cons_allocated(srccon) || !*sconp->vc_uni_pagedir_loc)
+		return -EINVAL;
+	if (*dconp->vc_uni_pagedir_loc == *sconp->vc_uni_pagedir_loc)
+		return 0;
+	con_free_unimap(dstcon);
+	q = (struct uni_pagedir *)*sconp->vc_uni_pagedir_loc;
+	q->refcount++;
+	*dconp->vc_uni_pagedir_loc = (long)q;
+	return 0;
+}
+
+int
 con_get_unimap(int con, ushort ct, ushort *uct, struct unipair *list)
 {
 	int i, j, k, ect;

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