Print this page
fixup .text where possible
7127  remove -Wno-missing-braces from Makefile.uts


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 

  28 #include <sys/types.h>
  29 #include <sys/param.h>
  30 #include <sys/time.h>
  31 #include <sys/cred.h>
  32 #include <sys/vfs.h>
  33 #include <sys/vfs_opreg.h>
  34 #include <sys/gfs.h>
  35 #include <sys/vnode.h>
  36 #include <sys/systm.h>
  37 #include <sys/errno.h>
  38 #include <sys/sysmacros.h>
  39 #include <fs/fs_subr.h>
  40 #include <sys/contract.h>
  41 #include <sys/contract_impl.h>
  42 #include <sys/ctfs.h>
  43 #include <sys/ctfs_impl.h>
  44 #include <sys/file.h>
  45 #include <sys/policy.h>
  46 
  47 /*


 318         short *reventsp,
 319         pollhead_t **php,
 320         caller_context_t *ct)
 321 {
 322         ctfs_evnode_t *evnode = vp->v_data;
 323 
 324         return (ctfs_endpoint_poll(&evnode->ctfs_ev_listener, events, anyyet,
 325             reventsp, php));
 326 }
 327 
 328 const fs_operation_def_t ctfs_tops_event[] = {
 329         { VOPNAME_OPEN,         { .vop_open = ctfs_ev_open } },
 330         { VOPNAME_CLOSE,        { .vop_close = ctfs_close } },
 331         { VOPNAME_IOCTL,        { .vop_ioctl = ctfs_ev_ioctl } },
 332         { VOPNAME_GETATTR,      { .vop_getattr = ctfs_ev_getattr } },
 333         { VOPNAME_ACCESS,       { .vop_access = ctfs_ev_access } },
 334         { VOPNAME_READDIR,      { .error = fs_notdir } },
 335         { VOPNAME_LOOKUP,       { .error = fs_notdir } },
 336         { VOPNAME_INACTIVE,     { .vop_inactive = ctfs_ev_inactive } },
 337         { VOPNAME_POLL,         { .vop_poll = ctfs_ev_poll } },
 338         { NULL, NULL }
 339 };
 340 
 341 /*
 342  * ctfs_create_pbundle
 343  *
 344  * Creates and returns a bunode for a /system/contract/<type>/pbundle
 345  * file.
 346  */
 347 vnode_t *
 348 ctfs_create_pbundle(vnode_t *pvp)
 349 {
 350         vnode_t *vp;
 351         ctfs_bunode_t *bundle;
 352 
 353         vp = gfs_file_create(sizeof (ctfs_bunode_t), pvp, ctfs_ops_bundle);
 354         bundle = vp->v_data;
 355         bundle->ctfs_bu_queue =
 356             contract_type_pbundle(ct_types[gfs_file_index(pvp)], curproc);
 357 
 358         return (vp);


 478         short *reventsp,
 479         pollhead_t **php,
 480         caller_context_t *ct)
 481 {
 482         ctfs_bunode_t *bunode = vp->v_data;
 483 
 484         return (ctfs_endpoint_poll(&bunode->ctfs_bu_listener, events, anyyet,
 485             reventsp, php));
 486 }
 487 
 488 const fs_operation_def_t ctfs_tops_bundle[] = {
 489         { VOPNAME_OPEN,         { .vop_open = ctfs_bu_open } },
 490         { VOPNAME_CLOSE,        { .vop_close = ctfs_close } },
 491         { VOPNAME_IOCTL,        { .vop_ioctl = ctfs_bu_ioctl } },
 492         { VOPNAME_GETATTR,      { .vop_getattr = ctfs_bu_getattr } },
 493         { VOPNAME_ACCESS,       { .vop_access = ctfs_access_readonly } },
 494         { VOPNAME_READDIR,      { .error = fs_notdir } },
 495         { VOPNAME_LOOKUP,       { .error = fs_notdir } },
 496         { VOPNAME_INACTIVE,     { .vop_inactive = ctfs_bu_inactive } },
 497         { VOPNAME_POLL,         { .vop_poll = ctfs_bu_poll } },
 498         { NULL, NULL }
 499 };


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 

  26 
  27 
  28 #include <sys/types.h>
  29 #include <sys/param.h>
  30 #include <sys/time.h>
  31 #include <sys/cred.h>
  32 #include <sys/vfs.h>
  33 #include <sys/vfs_opreg.h>
  34 #include <sys/gfs.h>
  35 #include <sys/vnode.h>
  36 #include <sys/systm.h>
  37 #include <sys/errno.h>
  38 #include <sys/sysmacros.h>
  39 #include <fs/fs_subr.h>
  40 #include <sys/contract.h>
  41 #include <sys/contract_impl.h>
  42 #include <sys/ctfs.h>
  43 #include <sys/ctfs_impl.h>
  44 #include <sys/file.h>
  45 #include <sys/policy.h>
  46 
  47 /*


 318         short *reventsp,
 319         pollhead_t **php,
 320         caller_context_t *ct)
 321 {
 322         ctfs_evnode_t *evnode = vp->v_data;
 323 
 324         return (ctfs_endpoint_poll(&evnode->ctfs_ev_listener, events, anyyet,
 325             reventsp, php));
 326 }
 327 
 328 const fs_operation_def_t ctfs_tops_event[] = {
 329         { VOPNAME_OPEN,         { .vop_open = ctfs_ev_open } },
 330         { VOPNAME_CLOSE,        { .vop_close = ctfs_close } },
 331         { VOPNAME_IOCTL,        { .vop_ioctl = ctfs_ev_ioctl } },
 332         { VOPNAME_GETATTR,      { .vop_getattr = ctfs_ev_getattr } },
 333         { VOPNAME_ACCESS,       { .vop_access = ctfs_ev_access } },
 334         { VOPNAME_READDIR,      { .error = fs_notdir } },
 335         { VOPNAME_LOOKUP,       { .error = fs_notdir } },
 336         { VOPNAME_INACTIVE,     { .vop_inactive = ctfs_ev_inactive } },
 337         { VOPNAME_POLL,         { .vop_poll = ctfs_ev_poll } },
 338         { NULL,                 { NULL } }
 339 };
 340 
 341 /*
 342  * ctfs_create_pbundle
 343  *
 344  * Creates and returns a bunode for a /system/contract/<type>/pbundle
 345  * file.
 346  */
 347 vnode_t *
 348 ctfs_create_pbundle(vnode_t *pvp)
 349 {
 350         vnode_t *vp;
 351         ctfs_bunode_t *bundle;
 352 
 353         vp = gfs_file_create(sizeof (ctfs_bunode_t), pvp, ctfs_ops_bundle);
 354         bundle = vp->v_data;
 355         bundle->ctfs_bu_queue =
 356             contract_type_pbundle(ct_types[gfs_file_index(pvp)], curproc);
 357 
 358         return (vp);


 478         short *reventsp,
 479         pollhead_t **php,
 480         caller_context_t *ct)
 481 {
 482         ctfs_bunode_t *bunode = vp->v_data;
 483 
 484         return (ctfs_endpoint_poll(&bunode->ctfs_bu_listener, events, anyyet,
 485             reventsp, php));
 486 }
 487 
 488 const fs_operation_def_t ctfs_tops_bundle[] = {
 489         { VOPNAME_OPEN,         { .vop_open = ctfs_bu_open } },
 490         { VOPNAME_CLOSE,        { .vop_close = ctfs_close } },
 491         { VOPNAME_IOCTL,        { .vop_ioctl = ctfs_bu_ioctl } },
 492         { VOPNAME_GETATTR,      { .vop_getattr = ctfs_bu_getattr } },
 493         { VOPNAME_ACCESS,       { .vop_access = ctfs_access_readonly } },
 494         { VOPNAME_READDIR,      { .error = fs_notdir } },
 495         { VOPNAME_LOOKUP,       { .error = fs_notdir } },
 496         { VOPNAME_INACTIVE,     { .vop_inactive = ctfs_bu_inactive } },
 497         { VOPNAME_POLL,         { .vop_poll = ctfs_bu_poll } },
 498         { NULL,                 { NULL } }
 499 };