Print this page
7127  remove -Wno-missing-braces from Makefile.uts


  84 };
  85 #endif  /* _SYSCALL32_IMPL */
  86 
  87 static vfsdef_t vfw = {
  88         VFSDEF_VERSION,
  89         "autofs",
  90         autofs_init,
  91         VSW_HASPROTO|VSW_CANRWRO|VSW_CANREMOUNT|VSW_STATS|VSW_ZMOUNT,
  92         &auto_mntopts
  93 };
  94 
  95 /*
  96  * Module linkage information for the kernel.
  97  */
  98 static struct modlfs modlfs = {
  99         &mod_fsops, "filesystem for autofs", &vfw
 100 };
 101 
 102 static struct modlinkage modlinkage = {
 103         MODREV_1,
 104         &modlfs,
 105         &modlsys,
 106 #ifdef  _SYSCALL32_IMPL
 107         &modlsys32,
 108 #endif
 109         NULL

 110 };
 111 
 112 /*
 113  * This is the module initialization routine.
 114  */
 115 int
 116 _init(void)
 117 {
 118         return (mod_install(&modlinkage));
 119 }
 120 
 121 int
 122 _fini(void)
 123 {
 124         /*
 125          * Don't allow the autofs module to be unloaded for now.
 126          */
 127         return (EBUSY);
 128 }
 129 


 230         fngp->fng_fnnode_count = 1;
 231         fngp->fng_printed_not_running_msg = 0;
 232         fngp->fng_zoneid = zoneid;
 233         mutex_init(&fngp->fng_unmount_threads_lock, NULL, MUTEX_DEFAULT,
 234             NULL);
 235         fngp->fng_unmount_threads = 0;
 236 
 237         mutex_init(&fngp->fng_autofs_daemon_lock, NULL, MUTEX_DEFAULT, NULL);
 238 
 239         /*
 240          * Start the unmounter thread for this zone.
 241          */
 242         (void) zthread_create(NULL, 0, auto_do_unmount, fngp, 0, minclsyspri);
 243         return (fngp);
 244 }
 245 
 246 int
 247 autofs_init(int fstype, char *name)
 248 {
 249         static const fs_operation_def_t auto_vfsops_template[] = {
 250                 VFSNAME_MOUNT,          { .vfs_mount = auto_mount },
 251                 VFSNAME_UNMOUNT,        { .vfs_unmount = auto_unmount },
 252                 VFSNAME_ROOT,           { .vfs_root = auto_root },
 253                 VFSNAME_STATVFS,        { .vfs_statvfs = auto_statvfs },
 254                 NULL,                   NULL
 255         };
 256         int error;
 257 
 258         autofs_fstype = fstype;
 259         ASSERT(autofs_fstype != 0);
 260         /*
 261          * Associate VFS ops vector with this fstype
 262          */
 263         error = vfs_setfsops(fstype, auto_vfsops_template, NULL);
 264         if (error != 0) {
 265                 cmn_err(CE_WARN, "autofs_init: bad vfs ops template");
 266                 return (error);
 267         }
 268 
 269         error = vn_make_ops(name, auto_vnodeops_template, &auto_vnodeops);
 270         if (error != 0) {
 271                 (void) vfs_freevfsops_by_type(fstype);
 272                 cmn_err(CE_WARN, "autofs_init: bad vnode ops template");
 273                 return (error);
 274         }




  84 };
  85 #endif  /* _SYSCALL32_IMPL */
  86 
  87 static vfsdef_t vfw = {
  88         VFSDEF_VERSION,
  89         "autofs",
  90         autofs_init,
  91         VSW_HASPROTO|VSW_CANRWRO|VSW_CANREMOUNT|VSW_STATS|VSW_ZMOUNT,
  92         &auto_mntopts
  93 };
  94 
  95 /*
  96  * Module linkage information for the kernel.
  97  */
  98 static struct modlfs modlfs = {
  99         &mod_fsops, "filesystem for autofs", &vfw
 100 };
 101 
 102 static struct modlinkage modlinkage = {
 103         MODREV_1,
 104         {   &modlfs,
 105             &modlsys,
 106 #ifdef  _SYSCALL32_IMPL
 107             &modlsys32,
 108 #endif
 109             NULL
 110         }
 111 };
 112 
 113 /*
 114  * This is the module initialization routine.
 115  */
 116 int
 117 _init(void)
 118 {
 119         return (mod_install(&modlinkage));
 120 }
 121 
 122 int
 123 _fini(void)
 124 {
 125         /*
 126          * Don't allow the autofs module to be unloaded for now.
 127          */
 128         return (EBUSY);
 129 }
 130 


 231         fngp->fng_fnnode_count = 1;
 232         fngp->fng_printed_not_running_msg = 0;
 233         fngp->fng_zoneid = zoneid;
 234         mutex_init(&fngp->fng_unmount_threads_lock, NULL, MUTEX_DEFAULT,
 235             NULL);
 236         fngp->fng_unmount_threads = 0;
 237 
 238         mutex_init(&fngp->fng_autofs_daemon_lock, NULL, MUTEX_DEFAULT, NULL);
 239 
 240         /*
 241          * Start the unmounter thread for this zone.
 242          */
 243         (void) zthread_create(NULL, 0, auto_do_unmount, fngp, 0, minclsyspri);
 244         return (fngp);
 245 }
 246 
 247 int
 248 autofs_init(int fstype, char *name)
 249 {
 250         static const fs_operation_def_t auto_vfsops_template[] = {
 251                 { VFSNAME_MOUNT,        { .vfs_mount = auto_mount } },
 252                 { VFSNAME_UNMOUNT,      { .vfs_unmount = auto_unmount } },
 253                 { VFSNAME_ROOT,         { .vfs_root = auto_root } },
 254                 { VFSNAME_STATVFS,      { .vfs_statvfs = auto_statvfs } },
 255                 { NULL,                 { NULL } }
 256         };
 257         int error;
 258 
 259         autofs_fstype = fstype;
 260         ASSERT(autofs_fstype != 0);
 261         /*
 262          * Associate VFS ops vector with this fstype
 263          */
 264         error = vfs_setfsops(fstype, auto_vfsops_template, NULL);
 265         if (error != 0) {
 266                 cmn_err(CE_WARN, "autofs_init: bad vfs ops template");
 267                 return (error);
 268         }
 269 
 270         error = vn_make_ops(name, auto_vnodeops_template, &auto_vnodeops);
 271         if (error != 0) {
 272                 (void) vfs_freevfsops_by_type(fstype);
 273                 cmn_err(CE_WARN, "autofs_init: bad vnode ops template");
 274                 return (error);
 275         }