Print this page
Bring back LX zones.

@@ -445,10 +445,22 @@
         ptms_close(ptmp, PTMOPEN | PTLOCK);
 
         return (0);
 }
 
+static boolean_t
+ptmptsopencb(ptmptsopencb_arg_t arg)
+{
+        struct pt_ttys  *ptmp = (struct pt_ttys *)arg;
+        boolean_t rval;
+
+        PT_ENTER_READ(ptmp);
+        rval = (ptmp->pt_nullmsg != NULL);
+        PT_EXIT_READ(ptmp);
+        return (rval);
+}
+
 /*
  * The wput procedure will only handle ioctl and flush messages.
  */
 static void
 ptmwput(queue_t *qp, mblk_t *mp)

@@ -572,10 +584,45 @@
                         ptmp->pt_rgid = ptop->pto_rgid;
                         mutex_exit(&ptmp->pt_lock);
                         miocack(qp, mp, 0, 0);
                         break;
                 }
+                case PTMPTSOPENCB:
+                {
+                        mblk_t          *dp;    /* ioctl reply data */
+                        ptmptsopencb_t  *ppocb;
+
+                        /* only allow the kernel to invoke this ioctl */
+                        if (iocp->ioc_cr != kcred) {
+                                miocnak(qp, mp, 0, EINVAL);
+                                break;
+                        }
+
+                        /* we don't support transparent ioctls */
+                        ASSERT(iocp->ioc_count != TRANSPARENT);
+                        if (iocp->ioc_count == TRANSPARENT) {
+                                miocnak(qp, mp, 0, EINVAL);
+                                break;
+                        }
+
+                        /* allocate a response message */
+                        dp = allocb(sizeof (ptmptsopencb_t), BPRI_MED);
+                        if (dp == NULL) {
+                                miocnak(qp, mp, 0, EAGAIN);
+                                break;
+                        }
+
+                        /* initialize the ioctl results */
+                        ppocb = (ptmptsopencb_t *)dp->b_rptr;
+                        ppocb->ppocb_func = ptmptsopencb;
+                        ppocb->ppocb_arg = (ptmptsopencb_arg_t)ptmp;
+
+                        /* send the reply data */
+                        mioc2ack(mp, dp, sizeof (ptmptsopencb_t), 0);
+                        qreply(qp, mp);
+                        break;
+                }
                 }
                 break;
 
         case M_READ:
                 /* Caused by ldterm - can not pass to slave */