易截截图软件、单文件、免安装、纯绿色、仅160KB

LINUX的热插拔机制(经典文章)

 linux的热插拔是Greg Kroah-Hartman维护,所以这是篇经典文章。如果你有USB或者PCI设备驱动开发基础,一读就可以理解。
Hot-pluggable devices have been created to solve a number of user needs. On laptop computers, PCMCIA devices were designed to allow the user to swap cards while the computer was still running. This allowed people to change network adaptors, memory cards and even disk drives without shutting down the machine.
The success of this led to the creation of the USB and IEEE1394 (FireWire) buses. These designs allow for peripherals to be attached and removed at any point. They also were created to try to move systems away from the ISA bus to a full Plug-and-Play-type system.
from the operating system's point of view, there are many problems with hot plugging devices. In the past, the operating system only had to search for the various devices connected to it on power-up, and once seen, the device would never go away. from the view of the device driver, it never expects to have the hardware that it is trying to control disappear. But with hot-pluggable devices, all of this changes.
Now the operating system has to have a mechanism that constantly detects if a new device appears. This usually is done by a bus-specific manager. This manager handles the scanning for new devices and recognizes this disappearance. It must be able to create system resources for the new device and pass control off to a specific driver. The device driver for a hot-pluggable device has to be able to recover gracefully when the hardware is removed and be able to bind itself to new hardware at any moment. Not only does the kernel need to know when devices are removed or added, but the user also should be notified when this happens. Other kinds of kernel events, such as the creation of network devices or the insertion of a laptop into a docking station, also would be useful for the user to know about.
This article describes the new framework in the Linux kernel for supporting USB and


相关文档:

实战Linux Bluetooth编程(六) L2CAP编程实例

例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
 如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......

实战Linux Bluetooth编程 (七) SDP协议

Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......

Linux下常用函数


getenv(取得环境变量内容)  
相关函数   putenv,setenv,unsetenv
表头文件   #include<stdlib.h>
定义函数   char * getenv(const char *name);
函数说明   getenv()用来取得参数name环境变量的内容。参数name为环境变量的名称,如果该变量存在则会返回 ......

Linux软件安装之RPM的安装技巧(转)

 今天在家安装oracle,安装之前已经检查过一些必要的包,而且问过同事,说已经安装的这些包已经可以满足要求了。于是乎开始oracle的安装。oracle自己进行包check时报libaio这个包没有,于是上网找了一个rpm的,还是src.rpm的。由于小弟初涉linux,很多命令都不知道,所以上网搜寻了一下,发现此贴。转载,以防忘记。
......

Linux系统下NFS服务器的配置

 
一、NFS服务器的安装
    检查linux系统中是否安装了nfs-utils和portmap两个软件包(RHEL4系统默认已经安装了这两个软件包)
    命令#rpm –q nfs-utils portmap
    二、查看NFS服务器是否启动
    命令#service nfs starus
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号