Print this page
8368 remove warlock leftovers from usr/src/uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/dev/sdev_vtops.c
          +++ new/usr/src/uts/common/fs/dev/sdev_vtops.c
↓ open down ↓ 32 lines elided ↑ open up ↑
  33   33  #include <fs/fs_subr.h>
  34   34  #include <sys/fs/dv_node.h>
  35   35  #include <sys/fs/sdev_impl.h>
  36   36  #include <sys/policy.h>
  37   37  #include <sys/stat.h>
  38   38  #include <sys/vfs_opreg.h>
  39   39  #include <sys/tty.h>
  40   40  #include <sys/vt_impl.h>
  41   41  #include <sys/note.h>
  42   42  
  43      -/* warlock in this file only cares about variables shared by vt and devfs */
  44      -_NOTE(SCHEME_PROTECTS_DATA("Do not care", sdev_node vattr vnode))
  45      -
  46   43  #define DEVVT_UID_DEFAULT       SDEV_UID_DEFAULT
  47   44  #define DEVVT_GID_DEFAULT       (0)
  48   45  #define DEVVT_DEVMODE_DEFAULT   (0600)
  49   46  #define DEVVT_ACTIVE_NAME       "active"
  50   47  #define DEVVT_CONSUSER_NAME     "console_user"
  51   48  
  52   49  #define isdigit(ch)     ((ch) >= '0' && (ch) <= '9')
  53   50  
  54   51  /* attributes for VT nodes */
  55   52  static vattr_t devvt_vattr = {
↓ open down ↓ 134 lines elided ↑ open up ↑
 190  187          struct vnode *rvp = NULL;
 191  188          int type, error;
 192  189  
 193  190          if ((strcmp(nm, DEVVT_ACTIVE_NAME) == 0) ||
 194  191              (strcmp(nm, DEVVT_CONSUSER_NAME) == 0)) {
 195  192                  type = SDEV_VLINK;
 196  193          } else {
 197  194                  type = SDEV_VATTR;
 198  195          }
 199  196  
 200      -/* Give warlock a more clear call graph */
 201      -#ifndef __lock_lint
 202  197          error = devname_lookup_func(sdvp, nm, vpp, cred,
 203  198              devvt_create_rvp, type);
 204      -#else
 205      -        devvt_create_rvp(0, 0, 0, 0, 0, 0);
 206      -#endif
 207  199  
 208  200          if (error == 0) {
 209  201                  switch ((*vpp)->v_type) {
 210  202                  case VCHR:
 211  203                          dv = VTOSDEV(VTOS(*vpp)->s_realvp);
 212  204                          ASSERT(VOP_REALVP(SDEVTOV(dv), &rvp, NULL) == ENOSYS);
 213  205                          break;
 214  206                  case VDIR:
 215  207                  case VLNK:
 216  208                          dv = VTOSDEV(*vpp);
↓ open down ↓ 138 lines elided ↑ open up ↑
 355  347  {
 356  348          struct sdev_node *sdvp = VTOSDEV(dvp);
 357  349          struct sdev_node *dv, *next = NULL;
 358  350          int min, cnt;
 359  351          char found = 0;
 360  352  
 361  353          mutex_enter(&vc_lock);
 362  354          cnt = VC_INSTANCES_COUNT;
 363  355          mutex_exit(&vc_lock);
 364  356  
 365      -/* We have to fool warlock this way, otherwise it will complain */
 366      -#ifndef __lock_lint
 367  357          if (rw_tryupgrade(&sdvp->sdev_contents) == NULL) {
 368  358                  rw_exit(&sdvp->sdev_contents);
 369  359                  rw_enter(&sdvp->sdev_contents, RW_WRITER);
 370  360          }
 371      -#else
 372      -        rw_enter(&sdvp->sdev_contents, RW_WRITER);
 373      -#endif
 374  361  
 375  362          /* 1.  prune invalid nodes and rebuild stale symlinks */
 376  363          devvt_prunedir(sdvp);
 377  364  
 378  365          /* 2. create missing nodes */
 379  366          for (min = 0; min < cnt; min++) {
 380  367                  char nm[16];
 381  368  
 382  369                  if (vt_minor_valid(min) == B_FALSE)
 383  370                          continue;
↓ open down ↓ 30 lines elided ↑ open up ↑
 414  401                          found |= 0x02;
 415  402  
 416  403                  if ((found & 0x01) && (found & 0x02))
 417  404                          break;
 418  405          }
 419  406          if (!(found & 0x01))
 420  407                  devvt_create_snode(sdvp, DEVVT_ACTIVE_NAME, cred, SDEV_VLINK);
 421  408          if (!(found & 0x02))
 422  409                  devvt_create_snode(sdvp, DEVVT_CONSUSER_NAME, cred, SDEV_VLINK);
 423  410  
 424      -#ifndef __lock_lint
 425  411          rw_downgrade(&sdvp->sdev_contents);
 426      -#else
 427      -        rw_exit(&sdvp->sdev_contents);
 428      -#endif
 429  412  }
 430  413  
 431  414  /*ARGSUSED4*/
 432  415  static int
 433  416  devvt_readdir(struct vnode *dvp, struct uio *uiop, struct cred *cred,
 434  417      int *eofp, caller_context_t *ct, int flags)
 435  418  {
 436  419          if (uiop->uio_offset == 0) {
 437  420                  devvt_cleandir(dvp, cred);
 438  421          }
↓ open down ↓ 54 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX