From 78c388aed2b7184182c08428db1de6c872d815f5 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 4 Jan 1999 16:03:48 +0000 Subject: Merge with Linux 2.1.131 and more MIPS goodies. (Did I mention that CVS is buggy ...) --- drivers/char/consolemap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/char/consolemap.c') diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index e63386d7c..95bb6f204 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c @@ -575,6 +575,24 @@ con_set_default_unimap(int con) return err; } +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) { -- cgit v1.2.3