Diff for /wikisrc/users/mlelstv/disk-driver-template.mdwn between versions 1.11 and 1.12

version 1.11, 2016/11/28 06:34:28 version 1.12, 2016/12/08 11:39:34
Line 54  static const struct dkdriver xxxdkdriver Line 54  static const struct dkdriver xxxdkdriver
         .d_open = xxxopen,          .d_open = xxxopen,
         .d_close = xxxclose,          .d_close = xxxclose,
         .d_strategy = xxxstrategy,          .d_strategy = xxxstrategy,
         .d_iosize = xxx_iosize,  
         .d_minphys  = xxxminphys,          .d_minphys  = xxxminphys,
         .d_diskstart = xxx_diskstart,          .d_diskstart = xxx_diskstart,
         .d_dumpblocks = xxx_dumpblocks,  
         .d_lastclose = xxx_lastclose,  
         .d_discard = xxx_discard,          .d_discard = xxx_discard,
         .d_firstopen = xxx_firstopen          .d_dumpblocks = xxx_dumpblocks, /* optional */
           .d_iosize = xxx_iosize,         /* optional */
           .d_lastclose = xxx_lastclose,   /* optional */
           .d_firstopen = xxx_firstopen,   /* optional */
           .d_label = xxx_label,           /* optional */
 };  };
   
 static int      xxx_match(device_t, cfdata_t, void *);  static int      xxx_match(device_t, cfdata_t, void *);
Line 463  static int Line 464  static int
 xxx_dumpblocks(device_t dv, void *va, daddr_t blkno, int nblk)  xxx_dumpblocks(device_t dv, void *va, daddr_t blkno, int nblk)
 {  {
         // issue polling I/O to dump a page          // issue polling I/O to dump a page
           // return error
 }  }
   
 static void  static void
Line 475  static int Line 477  static int
 xxx_discard(device_t dv, off_t pos, off_t len)  xxx_discard(device_t dv, off_t pos, off_t len)
 {  {
         // issue request to discard bytes          // issue request to discard bytes
           // return error
 }  }
   
   static void
   xxx_label(device_t dv, struct disklabel *lp)
   {
           // lp is initialized for generic disk
           // augment with driver specific information
   }
   
 </code></pre>  </code></pre>
   
 ----  ----

Removed from v.1.11  
changed lines
  Added in v.1.12


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb