8. 设备号     kdev_t被废除不可用,新的dev_t拓展到了32位,12位主设备号,20位次设备号。 
  unsigned int iminor(struct inode *inode);   unsigned int imajor(struct inode *inode); 
  老版本:8位主设备号,8位次设备号 
  int MAJOR(kdev_t dev);   int MINOR(kdev_t dev); 
  9. 内存分配头文件变更 
  所有的内存分配函数包含在头文件,而原来的不存在   老版本:内存分配函数包含在头文件 
  10. 结构体的初试化 
  gcc开始采用ANSI C的struct结构体的初始化形式: 
  static struct some_structure =    {     .field1 = value,     .field2 = value,     ...   }; 
  老版本:非标准的初试化形式 
  static struct some_structure =    {     field1: value,     field2: value,     ...   }; 
  11. 用户模式帮助器 
  int call_usermodehelper(char *path, char **argv, char **envp, int wait);
  
  新增wait参数 
  12. request_module() 
  request_module("foo-device-%d", number); 
  老版本: 
  char module_name[32];   printf(module_name, "foo-device-%d", number);   request_module(module_name);
  
-- ※ 链接: http://fanqiang.chinaunix.net/system/linux/2006-06-30/4730.shtml 
		    
                      
		      
		      
		   |