净雾天空吧 关注:8贴子:3,645
  • 13回复贴,共1
  • 218.76.65.*
我彦子
最近有见2J么?


1楼2007-10-19 15:38回复
    偶早不见2J踪影了~~~~- -~
    话说也好久没回偶自己吧里看了~~


    禁言 |2楼2007-10-19 22:11
    回复
      #include <linux/kernel.h>
      #include <linux/module.h>
      #if CONFIG_MODVERSIONS==1
      #define MODVERSIONS
      #include <linux/modversions.h>
      #endif
      int init_module()
      {
      printk("Hello!This is a testing module!\n");
      return 0;
      }
      void cleanup_module()
      {
      printk("Sorry!The testing module is unloading now!\n");


      禁言 |3楼2007-11-22 10:36
      回复
        MD~- -
        zhongyu zhaodao ge difang shuohua le ~- -
        NND~daodi za huan shuru fa a ~~- -


        禁言 |4楼2007-11-22 10:37
        回复
          #include<linux/kernel.h>
          #include<linux/module.h>
          #if CONFIG_MODVERSIONS==1
          #define MODVERSIONS
          #include<linux/modversions.h>
          #endif
          int init_module()
          {
          printk("Hello!This is a testing module!\n");
          return 0;
          }
          void cleanup_module()
          {
          printk("Sorry!The testing module is unloading now!\n");
          }
          int open(struct inode*inode,struct file*file)
          {
          MOD_INC_USE_COUNT;
          printk("This module is in open!\n");
          return 0;
          }


          禁言 |5楼2007-11-22 10:41
          回复
            #include<linux/module.h>
            int init_module()
            {
            int iValue;
            __asm__ __volatile__("
            movl %%cr3,%0": "=r"(iValue));
            printk("cr3:%d",iValue);
            return 0;
            }
            void cleanup_module(void)
            {
            printk("uninstall GetCr3!\n");
            }


            禁言 |6楼2007-11-22 10:41
            回复
              还是用WIN的爽~~
              某女人加油敲啊~~~


              IP属地:上海禁言 |7楼2007-11-22 10:59
              回复
                #include<linux/kernel.h>
                #include<linux/module.h>
                #if CONFIG_MODVERSIONS==1
                #define MODVERSIONS
                #include<linux/modversions.h>
                #endif
                int init_module()
                {
                printk("Hello!This is a testing module!\n");
                return 0;
                }
                void cleanup_module()
                {
                printk("Sorry!The testing module is unloading now!\n");
                }
                int open(struct inode*inode,struct file*filp)
                {
                MOD_INC_USE_COUNT;
                printk("This module is in open!\n");
                return 0;
                }
                void release(struct inode*inode,struct file*filp)
                {
                MOD_DEC_USE_COUNT;
                printk("This module is in release!\n");
                return 0;
                #ifdef DEBUG
                printk("release(%p,%p)\n",inode,filp);
                #endif
                }
                int read(struct inode*inode, struct file*filp, char*buf, int count)
                {
                int leave;
                if(verify_area(VERIFY_WRITE, buf, count)==DEFAULT)
                return DEFAULT;
                for(leave=count;leave>0;leave--)
                {
                __put_user(1,buf,1);
                buf++;
                }
                return count;
                }


                禁言 |8楼2007-11-22 10:59
                回复
                  int write(struct inode*inode, struct file*filp, const char*buf, int count)
                  {
                  return count;
                  }


                  禁言 |9楼2007-11-22 11:14
                  回复
                    • 218.76.83.*
                    PP

                    我檐


                    10楼2007-11-22 13:54
                    回复
                      阿拉拉~~~檐子~~~~~~


                      IP属地:上海禁言 |11楼2007-11-29 09:33
                      回复
                        • 211.71.28.*
                        将字符设备驱动程序源代码文件(如scull.h和scull.c)复制到目录drivers/char中。
                        在chr_dev_init()函数的最后增加调用init_module()子程序的行(chr_dev_init()函数在drivers/char/mem.c中)。
                        编辑drivers/char/makefile文件,将scull.o加入到obj-y中,即:obj-y += scull.o

                        将目录改变到Linux源程序目录的最上层,重新建立和安装内核。作为一般性预防措施,当改变内核 的代码时,应当将计算机上的重要内容做一次备份。
                        将新内核加入引导系统中,重新启动Linux,进入新Linux内核。

                        获得主设备号,在/proc/devices文件查询新加载设备的主设备号,操作方法有三种:
                        方法一:字符设备驱动程序加载后,要/proc/devices文件中获得主设备号
                        方法二:
                        #cat /proc/devices | awk ‘ $2~ ”chrdev\” { print \\$1} ’
                        方法三:
                         #cat /proc/devices | grep chrdev 
                        在/dev目录下创建字符设备文件chrdev,使用命令:
                        #mknod /dev/chrdev c major minor
                        其中:
                        c 表示chrdev是字符设备
                        majo 是chrdev的主设备号
                        minor 是chrdev的次设备号


                        12楼2007-12-20 08:39
                        回复
                          ND~~ziji qiao ba - -
                          ----------------------------------------
                          #include <stdio.h>
                          #include <malloc.h>
                          #include <stdlib.h>
                          #include <string.h>
                          #include "structure.h"
                          #include "creat.h"
                          #include "access.h"
                          #include "ballfre.h"
                          #include "close.h"
                          #include


                          禁言 |13楼2007-12-27 11:19
                          回复
                            #include "delete.h"
                            #include "dir.h"
                            #include "format.h"
                            #include "halt.h"
                            #include "iallfre.h"
                            #include "install.h"
                            #include "log.h"
                            #include "name.h"
                            #include "open.h"
                            #include "rdwt.h"
                            #include "igetput.h"

                            struct hinode hinode[NHINO];


                            IP属地:上海禁言 |14楼2007-12-27 20:57
                            回复