[BACK]Return to spec_vnops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / miscfs / specfs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/miscfs/specfs/spec_vnops.c between version 1.163 and 1.164

version 1.163, 2016/08/20 12:37:09 version 1.164, 2016/09/08 00:07:48
Line 482  spec_lookup(void *v)
Line 482  spec_lookup(void *v)
   
 typedef int (*spec_ioctl_t)(dev_t, u_long, void *, int, struct lwp *);  typedef int (*spec_ioctl_t)(dev_t, u_long, void *, int, struct lwp *);
   
   struct dev_to_mod {
           const char *dev_name, *mod_name;
   };
   
   struct dev_to_mod dev_mod_table[] = {
           { "tap", "if_tap" },
           { "tun", "if_tun" },
           { NULL, NULL }
   };
   
 /*  /*
  * Open a special file.   * Open a special file.
  */   */
Line 505  spec_open(void *v)
Line 515  spec_open(void *v)
         u_int gen;          u_int gen;
         const char *name;          const char *name;
         struct partinfo pi;          struct partinfo pi;
           struct dev_to_mod *conv;
   
         l = curlwp;          l = curlwp;
         vp = ap->a_vp;          vp = ap->a_vp;
Line 571  spec_open(void *v)
Line 582  spec_open(void *v)
                         /* Get device name from devsw_conv array */                          /* Get device name from devsw_conv array */
                         if ((name = cdevsw_getname(major(dev))) == NULL)                          if ((name = cdevsw_getname(major(dev))) == NULL)
                                 break;                                  break;
   
                           /* Check exception table for alternate module name */
                           conv = dev_mod_table;
                           while (conv->dev_name != NULL) {
                                   if (strcmp(conv->dev_name, name) == 0) {
                                           name = conv->mod_name;
                                           break;
                                   }
                                   conv++;
                           }
   
                         /* Try to autoload device module */                          /* Try to autoload device module */
                         (void) module_autoload(name, MODULE_CLASS_DRIVER);                          (void) module_autoload(name, MODULE_CLASS_DRIVER);
Line 623  spec_open(void *v)
Line 644  spec_open(void *v)
   
                         VOP_UNLOCK(vp);                          VOP_UNLOCK(vp);
   
                           /* Check exception table for alternate module name */
                           conv = dev_mod_table;
                           while (conv->dev_name != NULL) {
                                   if (strcmp(conv->dev_name, name) == 0) {
                                           name = conv->mod_name;
                                           break;
                                   }
                                   conv++;
                           }
   
                         /* Try to autoload device module */                          /* Try to autoload device module */
                         (void) module_autoload(name, MODULE_CLASS_DRIVER);                          (void) module_autoload(name, MODULE_CLASS_DRIVER);
   

Legend:
Removed from v.1.163  
changed lines
  Added in v.1.164

CVSweb <webmaster@jp.NetBSD.org>