linux uinput 分析。
linux uinput
本文以 2.6.22.7 的kernel 为基础。
首先 uinput 是一个字符设备, 其次它还是一个 input 设备。另外它可以是一个鼠标或者键盘设备。
从 init 部分说起吧。
static const struct file_operations uinput_fops = {
.owner = THIS_MODULE,
.open = uinput_open,
.release = uinput_release,
.read = uinput_read,
.write = uinput_write,
.poll = uinput_poll,
.unlocked_ioctl = uinput_ioctl,
};
static struct miscdevice uinput_misc = {
.fops = &uinput_fops,
.minor = UINPUT_MINOR,
.name = UINPUT_NAME,
};
static int __init uinput_init(void)
{
return misc_register(&uinput_misc);
}
首先说说 miscdevice, 很方便的东西,对 device 做了简单的包装,
当 misc_register 的时候就完成了 设备的 注册安装一类的东东, 不用自己再操心了。真是懒人的设计阿。
所有的 misc 设备公用同一个主设备号,在 misc_init 中,
static int __init misc_init(void)
{
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *ent;
ent = create_proc_entry("misc", 0, NULL);
if (ent)
ent->proc_fops = &misc_proc_fops;
#endif
misc_class = class_create(THIS_MODULE, "misc");
if (IS_ERR(misc_class))
return PTR_ERR(misc_class);
if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
printk("unable to get major
相关文档:
bash有两种输入模式vi模式和emacs模式,其中emacs是默认模式,而且操作起来也比vi模式要快捷。可以通过 set -o vi和set -o emacs来转换。
1.在命令历史中查找
强烈推荐使用 Ctrl+r, 这个键组合是反向增量查找消息历史。很好用。 比如你很久以前输入过某个命令如。 gcc -c -DKKT -
Dnnn 等等,一长串, ......
Linux下的安装与配置
如果所安装的Linux系统没有内置的MySQL,笔者建议在Linux中使用RPM包来安装MySQL,同样这也是MySQL官方提供的建议。笔者接触最多的Linux系统是Radhat的“近亲”:CentOS,由于CentOS较新的版本都内置了MySQL,因此在安装系统时就将MySQL安装并注册为系统服务,省去了不少工作量,此处也就不 ......
1、下载oracle软件
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
2、安装rpm包
rpm -ivh oracle-instantclient-basic-10.2.0.4 ......
一、打开/etc/apt/source.list源列表文件加放源
二、make 工具:
make默认查找的文件名:GNUmakefile makefile Makefile
&nbs ......
1操作系统的启动和操作系统的引导程序的编写
1.linux
0.01中的引导汇编程序的解释
当PC机打开电源后,80x86结构自动的进入实施模式。
--------------------------------------------------------------------------------------------
所谓的实时模式是指的cpu启动时候的模式,这时候就相当于一个速度超快的80 ......