[BACK]Return to zero.c CVS log [TXT][DIR] Up to [local] / prex-old / dev / gen

Diff for /prex-old/dev/gen/zero.c between version 1.1.1.1 and 1.1.1.1.2.1

version 1.1.1.1, 2008/06/03 10:38:41 version 1.1.1.1.2.1, 2008/08/13 17:12:23
Line 33 
Line 33 
   
 #include <driver.h>  #include <driver.h>
   
 static int zero_read(device_t dev, char *buf, size_t *nbyte, int blkno);  static int zero_read(device_t, char *, size_t *, int);
 static int zero_write(device_t dev, char *buf, size_t *nbyte, int blkno);  static int zero_write(device_t, char *, size_t *, int);
 static int zero_init(void);  static int zero_init(void);
   
 /*  /*
Line 46 
Line 46 
         /* init */      zero_init,          /* init */      zero_init,
 };  };
   
   /*
    * Device I/O table
    */
 static struct devio zero_io = {  static struct devio zero_io = {
         /* open */      NULL,          /* open */      NULL,
         /* close */     NULL,          /* close */     NULL,
Line 63 
Line 66 
 static int  static int
 zero_read(device_t dev, char *buf, size_t *nbyte, int blkno)  zero_read(device_t dev, char *buf, size_t *nbyte, int blkno)
 {  {
           void *kbuf;
   
         /* User buffer was already verified by kernel.  */          /* Translate buffer address to kernel address */
         memset(buf, 0, *nbyte);          kbuf = kmem_map(buf, *nbyte);
           if (kbuf == NULL)
                   return EFAULT;
           memset(kbuf, 0, *nbyte);
         return 0;          return 0;
 }  }
   

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.2.1

CVSweb