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


 168         &vfw3
 169 };
 170 
 171 extern struct modlfs modlfs4;
 172 
 173 /*
 174  * We have too many linkage structures so we define our own XXX
 175  */
 176 struct modlinkage_big {
 177         int             ml_rev;         /* rev of loadable modules system */
 178         void            *ml_linkage[7]; /* NULL terminated list of */
 179                                         /* linkage structures */
 180 };
 181 
 182 /*
 183  * All of the module configuration linkages required to configure
 184  * the system call and client VFS's into the system.
 185  */
 186 static struct modlinkage_big modlinkage = {
 187         MODREV_1,
 188         &modlsys,
 189 #ifdef _SYSCALL32_IMPL
 190         &modlsys32,
 191 #endif
 192         &modlfs,
 193         &modlfs2,
 194         &modlfs3,
 195         &modlfs4,
 196         NULL

 197 };
 198 
 199 /*
 200  * This routine is invoked automatically when the kernel module
 201  * containing this routine is loaded.  This allows module specific
 202  * initialization to be done when the module is loaded.
 203  */
 204 int
 205 _init(void)
 206 {
 207         int status;
 208 
 209         if ((status = nfs_clntinit()) != 0) {
 210                 cmn_err(CE_WARN, "_init: nfs_clntinit failed");
 211                 return (status);
 212         }
 213 
 214         /*
 215          * Create the version specific kstats.
 216          *


 313         return (nfs3_max_transfer_size_clts);
 314 }
 315 
 316 uint_t
 317 rfs3_tsize(struct svc_req *req)
 318 {
 319 
 320         if (req->rq_xprt->xp_type == T_COTS_ORD ||
 321             req->rq_xprt->xp_type == T_COTS)
 322                 return (nfs3_max_transfer_size_cots);
 323         if (req->rq_xprt->xp_type == T_RDMA)
 324                 return (nfs3_max_transfer_size_rdma);
 325         return (nfs3_max_transfer_size_clts);
 326 }
 327 
 328 /* ARGSUSED */
 329 static int
 330 nfsdyninit(int fstyp, char *name)
 331 {
 332         static const fs_operation_def_t nfsdyn_vfsops_template[] = {
 333                 VFSNAME_MOUNTROOT, { .vfs_mountroot = nfsdyn_mountroot },
 334                 NULL, NULL
 335         };
 336         int error;
 337 
 338         error = vfs_setfsops(fstyp, nfsdyn_vfsops_template, &nfsdyn_vfsops);
 339         if (error != 0)
 340                 return (error);
 341 
 342         return (0);
 343 }
 344 
 345 /* ARGSUSED */
 346 static int
 347 nfsdyn_mountroot(vfs_t *vfsp, whymountroot_t why)
 348 {
 349         char root_hostname[SYS_NMLN+1];
 350         struct servinfo *svp;
 351         int error;
 352         int vfsflags;
 353         char *root_path;
 354         struct pathname pn;




 168         &vfw3
 169 };
 170 
 171 extern struct modlfs modlfs4;
 172 
 173 /*
 174  * We have too many linkage structures so we define our own XXX
 175  */
 176 struct modlinkage_big {
 177         int             ml_rev;         /* rev of loadable modules system */
 178         void            *ml_linkage[7]; /* NULL terminated list of */
 179                                         /* linkage structures */
 180 };
 181 
 182 /*
 183  * All of the module configuration linkages required to configure
 184  * the system call and client VFS's into the system.
 185  */
 186 static struct modlinkage_big modlinkage = {
 187         MODREV_1,
 188         {   &modlsys,
 189 #ifdef _SYSCALL32_IMPL
 190             &modlsys32,
 191 #endif
 192             &modlfs,
 193             &modlfs2,
 194             &modlfs3,
 195             &modlfs4,
 196             NULL
 197         }
 198 };
 199 
 200 /*
 201  * This routine is invoked automatically when the kernel module
 202  * containing this routine is loaded.  This allows module specific
 203  * initialization to be done when the module is loaded.
 204  */
 205 int
 206 _init(void)
 207 {
 208         int status;
 209 
 210         if ((status = nfs_clntinit()) != 0) {
 211                 cmn_err(CE_WARN, "_init: nfs_clntinit failed");
 212                 return (status);
 213         }
 214 
 215         /*
 216          * Create the version specific kstats.
 217          *


 314         return (nfs3_max_transfer_size_clts);
 315 }
 316 
 317 uint_t
 318 rfs3_tsize(struct svc_req *req)
 319 {
 320 
 321         if (req->rq_xprt->xp_type == T_COTS_ORD ||
 322             req->rq_xprt->xp_type == T_COTS)
 323                 return (nfs3_max_transfer_size_cots);
 324         if (req->rq_xprt->xp_type == T_RDMA)
 325                 return (nfs3_max_transfer_size_rdma);
 326         return (nfs3_max_transfer_size_clts);
 327 }
 328 
 329 /* ARGSUSED */
 330 static int
 331 nfsdyninit(int fstyp, char *name)
 332 {
 333         static const fs_operation_def_t nfsdyn_vfsops_template[] = {
 334                 { VFSNAME_MOUNTROOT, { .vfs_mountroot = nfsdyn_mountroot } },
 335                 { NULL,                 { NULL } }
 336         };
 337         int error;
 338 
 339         error = vfs_setfsops(fstyp, nfsdyn_vfsops_template, &nfsdyn_vfsops);
 340         if (error != 0)
 341                 return (error);
 342 
 343         return (0);
 344 }
 345 
 346 /* ARGSUSED */
 347 static int
 348 nfsdyn_mountroot(vfs_t *vfsp, whymountroot_t why)
 349 {
 350         char root_hostname[SYS_NMLN+1];
 351         struct servinfo *svp;
 352         int error;
 353         int vfsflags;
 354         char *root_path;
 355         struct pathname pn;