当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 入门看什么?经典的书有哪些呢?谢谢大家了! ......
    摘要: 对于大虾来说也不算难题了。 一台win2000 server pc 服务器,安装有oracle8.05版数据库,现在win2000 server 系统因病毒导致崩溃。服务器需要重装。oracle数据库在崩溃前没有备份. 现在可以取到原数据库的一切文件(包括*.ora),请问怎样才能最好的恢复原来数据库的数据? ......


在线等重谢

各位大侠:为什么在对内核进行操作时用printk函数而不是printf呢,而且此程序不能运行.  
  我的一段程序为:  
  #include   <linux/kernel.h>       /*   Were   doing   kernel   work   */  
   
  #include   <linux/module.h>       /*   Specifically,   a   module   */  
   
   
   
   
   
   
   
  /*   Deal   with   CONFIG_MODVERSIONS   */  
   
  #if   CONFIG_MODVERSIONS==1  
   
  #define   MODVERSIONS  
   
  #include   <linux/modversions.h>  
   
  #endif                  
   
   
   
   
   
   
   
  /*   Initialize   the   module   */  
   
  int   init_module()  
   
  {  
   
      printk("Hello,   world   -   this   is   the   kernel   speaking\n");  
   
   
   
      /*   If   we   return   a   non   zero   value,   it   means   that    
   
        *   init_module   failed   and   the   kernel   module    
   
        *   cant   be   loaded   */  
   
      return   0;  
   
  }  
   
   
   
   
   
  /*   Cleanup   -   undid   whatever   init_module   did   */  
   
  void   cleanup_module()  
   
  {  
   
      printk("Short   is   the   life   of   a   kernel   module\n");  
   
  }

NO.1   作者: paopaoer

printf   is   in   the   user   mode  
  printk   is   in   the   kernel   mode  
  And   you   ask   why   ?    
  I   dont   know   I   only   know   how   to   use   it.  
   
  your   code   no   problem.  
  gcc   -c   hello.c   -I/usr/src/linux-2.4/include   -DMODULE   -D__KERNEL__

NO.2   作者: xjl1980_81

如果你的机器中内核源码的链接文件为linux-2.4,则试试  
  gcc   -O2   -DMODULE   -D__KERNEL__   -I/usr/src/linux-2.4/include   -c   hello.c  
  如果为linux,则试试  
  gcc   -O2   -DMODULE   -D__KERNEL__   -I/usr/src/linux/include   -c   hello.c  
 

NO.3   作者: hs_guanqi

这个程序不是直接运行的,是模块  
  加载用insmod   hello.o  
  卸载用rmmod   hello  
  如果加载不上,就在init函数里面加上一句MODULE_LICENSE("GPL");


    摘要: 主要有什么,最常用的有什么等 很久没上来这儿了,权当散分了 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE