Print this page
Bring back LX zones.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ptm.c
          +++ new/usr/src/uts/common/io/ptm.c
↓ open down ↓ 439 lines elided ↑ open up ↑
 440  440  
 441  441          /* Finish the close */
 442  442          rqp->q_ptr = NULL;
 443  443          WR(rqp)->q_ptr = NULL;
 444  444  
 445  445          ptms_close(ptmp, PTMOPEN | PTLOCK);
 446  446  
 447  447          return (0);
 448  448  }
 449  449  
      450 +static boolean_t
      451 +ptmptsopencb(ptmptsopencb_arg_t arg)
      452 +{
      453 +        struct pt_ttys  *ptmp = (struct pt_ttys *)arg;
      454 +        boolean_t rval;
      455 +
      456 +        PT_ENTER_READ(ptmp);
      457 +        rval = (ptmp->pt_nullmsg != NULL);
      458 +        PT_EXIT_READ(ptmp);
      459 +        return (rval);
      460 +}
      461 +
 450  462  /*
 451  463   * The wput procedure will only handle ioctl and flush messages.
 452  464   */
 453  465  static void
 454  466  ptmwput(queue_t *qp, mblk_t *mp)
 455  467  {
 456  468          struct pt_ttys  *ptmp;
 457  469          struct iocblk   *iocp;
 458  470  
 459  471          DBG(("entering ptmwput\n"));
↓ open down ↓ 105 lines elided ↑ open up ↑
 565  577                                  zone_rele(zone);
 566  578                                  miocnak(qp, mp, 0, EINVAL);
 567  579                                  break;
 568  580                          }
 569  581                          zone_rele(zone);
 570  582                          mutex_enter(&ptmp->pt_lock);
 571  583                          ptmp->pt_ruid = ptop->pto_ruid;
 572  584                          ptmp->pt_rgid = ptop->pto_rgid;
 573  585                          mutex_exit(&ptmp->pt_lock);
 574  586                          miocack(qp, mp, 0, 0);
      587 +                        break;
      588 +                }
      589 +                case PTMPTSOPENCB:
      590 +                {
      591 +                        mblk_t          *dp;    /* ioctl reply data */
      592 +                        ptmptsopencb_t  *ppocb;
      593 +
      594 +                        /* only allow the kernel to invoke this ioctl */
      595 +                        if (iocp->ioc_cr != kcred) {
      596 +                                miocnak(qp, mp, 0, EINVAL);
      597 +                                break;
      598 +                        }
      599 +
      600 +                        /* we don't support transparent ioctls */
      601 +                        ASSERT(iocp->ioc_count != TRANSPARENT);
      602 +                        if (iocp->ioc_count == TRANSPARENT) {
      603 +                                miocnak(qp, mp, 0, EINVAL);
      604 +                                break;
      605 +                        }
      606 +
      607 +                        /* allocate a response message */
      608 +                        dp = allocb(sizeof (ptmptsopencb_t), BPRI_MED);
      609 +                        if (dp == NULL) {
      610 +                                miocnak(qp, mp, 0, EAGAIN);
      611 +                                break;
      612 +                        }
      613 +
      614 +                        /* initialize the ioctl results */
      615 +                        ppocb = (ptmptsopencb_t *)dp->b_rptr;
      616 +                        ppocb->ppocb_func = ptmptsopencb;
      617 +                        ppocb->ppocb_arg = (ptmptsopencb_arg_t)ptmp;
      618 +
      619 +                        /* send the reply data */
      620 +                        mioc2ack(mp, dp, sizeof (ptmptsopencb_t), 0);
      621 +                        qreply(qp, mp);
 575  622                          break;
 576  623                  }
 577  624                  }
 578  625                  break;
 579  626  
 580  627          case M_READ:
 581  628                  /* Caused by ldterm - can not pass to slave */
 582  629                  freemsg(mp);
 583  630                  break;
 584  631  
↓ open down ↓ 120 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX