Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ff5d48a6
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ff5d48a6
编写于
7月 25, 2008
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.infradead.org/embedded-2.6
*
git://git.infradead.org/embedded-2.6
: Make console charset translation optional
上级
762b8291
a29ccf6f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
44 addition
and
3 deletion
+44
-3
drivers/char/Kconfig
drivers/char/Kconfig
+8
-0
drivers/char/Makefile
drivers/char/Makefile
+2
-2
drivers/char/vt.c
drivers/char/vt.c
+1
-1
include/linux/consolemap.h
include/linux/consolemap.h
+14
-0
include/linux/vt_kern.h
include/linux/vt_kern.h
+19
-0
未找到文件。
drivers/char/Kconfig
浏览文件 @
ff5d48a6
...
...
@@ -36,6 +36,14 @@ config VT
If unsure, say Y, or else you won't be able to do much with your new
shiny Linux system :-)
config CONSOLE_TRANSLATIONS
depends on VT
default y
bool "Enable character translations in console" if EMBEDDED
---help---
This enables support for font mapping and Unicode translation
on virtual consoles.
config VT_CONSOLE
bool "Support for console on virtual terminal" if EMBEDDED
depends on VT
...
...
drivers/char/Makefile
浏览文件 @
ff5d48a6
...
...
@@ -12,8 +12,8 @@ obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o tty_ldisc.o
obj-$(CONFIG_LEGACY_PTYS)
+=
pty.o
obj-$(CONFIG_UNIX98_PTYS)
+=
pty.o
obj-y
+=
misc.o
obj-$(CONFIG_VT)
+=
vt_ioctl.o vc_screen.o
consolemap.o
\
consolemap_deftbl.o selection.o keyboard
.o
obj-$(CONFIG_VT)
+=
vt_ioctl.o vc_screen.o
selection.o keyboard.o
obj-$(CONFIG_CONSOLE_TRANSLATIONS)
+=
consolemap.o consolemap_deftbl
.o
obj-$(CONFIG_HW_CONSOLE)
+=
vt.o defkeymap.o
obj-$(CONFIG_AUDIT)
+=
tty_audit.o
obj-$(CONFIG_MAGIC_SYSRQ)
+=
sysrq.o
...
...
drivers/char/vt.c
浏览文件 @
ff5d48a6
...
...
@@ -2211,7 +2211,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
c
=
0xfffd
;
tc
=
c
;
}
else
{
/* no utf or alternate charset mode */
tc
=
vc
->
vc_translate
[
vc
->
vc_toggle_meta
?
(
c
|
0x80
)
:
c
]
;
tc
=
vc
_translate
(
vc
,
c
)
;
}
param
.
c
=
tc
;
...
...
include/linux/consolemap.h
浏览文件 @
ff5d48a6
...
...
@@ -3,6 +3,9 @@
*
* Interface between console.c, selection.c and consolemap.c
*/
#ifndef __LINUX_CONSOLEMAP_H__
#define __LINUX_CONSOLEMAP_H__
#define LAT1_MAP 0
#define GRAF_MAP 1
#define IBMPC_MAP 2
...
...
@@ -10,6 +13,7 @@
#include <linux/types.h>
#ifdef CONFIG_CONSOLE_TRANSLATIONS
struct
vc_data
;
extern
u16
inverse_translate
(
struct
vc_data
*
conp
,
int
glyph
,
int
use_unicode
);
...
...
@@ -18,3 +22,13 @@ extern int conv_uni_to_pc(struct vc_data *conp, long ucs);
extern
u32
conv_8bit_to_uni
(
unsigned
char
c
);
extern
int
conv_uni_to_8bit
(
u32
uni
);
void
console_map_init
(
void
);
#else
#define inverse_translate(conp, glyph, uni) ((uint16_t)glyph)
#define set_translate(m, vc) ((unsigned short *)NULL)
#define conv_uni_to_pc(conp, ucs) ((int) (ucs > 0xff ? -1: ucs))
#define conv_8bit_to_uni(c) ((uint32_t)(c))
#define conv_uni_to_8bit(c) ((int) ((c) & 0xff))
#define console_map_init(c) do { ; } while (0)
#endif
/* CONFIG_CONSOLE_TRANSLATIONS */
#endif
/* __LINUX_CONSOLEMAP_H__ */
include/linux/vt_kern.h
浏览文件 @
ff5d48a6
...
...
@@ -12,6 +12,7 @@
#include <linux/mutex.h>
#include <linux/console_struct.h>
#include <linux/mm.h>
#include <linux/consolemap.h>
/*
* Presently, a lot of graphics programs do not restore the contents of
...
...
@@ -54,6 +55,7 @@ void redraw_screen(struct vc_data *vc, int is_switch);
struct
tty_struct
;
int
tioclinux
(
struct
tty_struct
*
tty
,
unsigned
long
arg
);
#ifdef CONFIG_CONSOLE_TRANSLATIONS
/* consolemap.c */
struct
unimapinit
;
...
...
@@ -71,6 +73,23 @@ void con_free_unimap(struct vc_data *vc);
void
con_protect_unimap
(
struct
vc_data
*
vc
,
int
rdonly
);
int
con_copy_unimap
(
struct
vc_data
*
dst_vc
,
struct
vc_data
*
src_vc
);
#define vc_translate(vc, c) ((vc)->vc_translate[(c) | \
(vc)->vc_toggle_meta ? 0x80 : 0])
#else
#define con_set_trans_old(arg) (0)
#define con_get_trans_old(arg) (-EINVAL)
#define con_set_trans_new(arg) (0)
#define con_get_trans_new(arg) (-EINVAL)
#define con_clear_unimap(vc, ui) (0)
#define con_set_unimap(vc, ct, list) (0)
#define con_set_default_unimap(vc) (0)
#define con_copy_unimap(d, s) (0)
#define con_get_unimap(vc, ct, uct, list) (-EINVAL)
#define con_free_unimap(vc) do { ; } while (0)
#define vc_translate(vc, c) (c)
#endif
/* vt.c */
int
vt_waitactive
(
int
vt
);
void
change_console
(
struct
vc_data
*
new_vc
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录