Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc
        
*** 399,409 ****
          break;
  
          case M_IOCACK:
          case M_IOCNAK:
                  /*
!                  * We only pass write-side ioctls through to the master that
                   * we've already ACKed or NAKed to the stream head.  Thus, we
                   * discard ones arriving from below, since they're redundant
                   * from the point of view of modules above us.
                   */
                  freemsg(mp);
--- 399,409 ----
          break;
  
          case M_IOCACK:
          case M_IOCNAK:
                  /*
!                  * We only pass write-side ioctls through to the manager that
                   * we've already ACKed or NAKed to the stream head.  Thus, we
                   * discard ones arriving from below, since they're redundant
                   * from the point of view of modules above us.
                   */
                  freemsg(mp);
*** 624,634 ****
                  /*
                   * Note:  for each "set" type operation a copy
                   * of the M_IOCTL message is made and passed
                   * downstream.  Eventually the PCKT module, if
                   * it has been pushed, should pick up this message.
!                  * If the PCKT module has not been pushed the master
                   * side stream head will free it.
                   */
                  iocp = (struct iocblk *)mp->b_rptr;
                  switch (iocp->ioc_cmd) {
  
--- 624,634 ----
                  /*
                   * Note:  for each "set" type operation a copy
                   * of the M_IOCTL message is made and passed
                   * downstream.  Eventually the PCKT module, if
                   * it has been pushed, should pick up this message.
!                  * If the PCKT module has not been pushed the manager
                   * side stream head will free it.
                   */
                  iocp = (struct iocblk *)mp->b_rptr;
                  switch (iocp->ioc_cmd) {
  
*** 841,852 ****
                          }
                          break;
  
                  default:
                          /*
!                          * End of the line.  The slave driver doesn't see any
!                          * ioctls that we don't explicitly pass along to it.
                           */
                          miocnak(q, mp, 0, EINVAL);
                          break;
                  }
                  break;
--- 841,853 ----
                          }
                          break;
  
                  default:
                          /*
!                          * End of the line.  The subsidiary driver doesn't see
!                          * any ioctls that we don't explicitly pass along to
!                          * it.
                           */
                          miocnak(q, mp, 0, EINVAL);
                          break;
                  }
                  break;
*** 981,998 ****
                                  (void) putnextctl1(RD(q), M_SIG, SIGWINCH);
                          else if (qside == RDSIDE)
                                  (void) putnextctl1(q, M_SIG, SIGWINCH);
                          /*
                           * Message may have come in as an M_IOCDATA; pass it
!                          * to the master side as an M_IOCTL.
                           */
                          mp->b_datap->db_type = M_IOCTL;
                          if (qside == WRSIDE) {
                                  /*
                                   * Need a copy of this message to pass on to
                                   * the PCKT module, only if the M_IOCTL
!                                  * orginated from the slave side.
                                   */
                                  if ((pckt_msgp = copymsg(mp)) == NULL) {
                                          miocnak(q, mp, 0, EAGAIN);
                                          return;
                                  }
--- 982,999 ----
                                  (void) putnextctl1(RD(q), M_SIG, SIGWINCH);
                          else if (qside == RDSIDE)
                                  (void) putnextctl1(q, M_SIG, SIGWINCH);
                          /*
                           * Message may have come in as an M_IOCDATA; pass it
!                          * to the manager side as an M_IOCTL.
                           */
                          mp->b_datap->db_type = M_IOCTL;
                          if (qside == WRSIDE) {
                                  /*
                                   * Need a copy of this message to pass on to
                                   * the PCKT module, only if the M_IOCTL
!                                  * orginated from the subsidiary side.
                                   */
                                  if ((pckt_msgp = copymsg(mp)) == NULL) {
                                          miocnak(q, mp, 0, EAGAIN);
                                          return;
                                  }
*** 1008,1018 ****
                  qreply(q, mp);
                  return;
  
          case TIOCSIGNAL: {
                  /*
!                  * This ioctl can emanate from the master side in remote
                   * mode only.
                   */
                  int     sig;
  
                  if (DB_TYPE(mp) == M_IOCTL && iocp->ioc_count != TRANSPARENT) {
--- 1009,1019 ----
                  qreply(q, mp);
                  return;
  
          case TIOCSIGNAL: {
                  /*
!                  * This ioctl can emanate from the manager side in remote
                   * mode only.
                   */
                  int     sig;
  
                  if (DB_TYPE(mp) == M_IOCTL && iocp->ioc_count != TRANSPARENT) {
*** 1032,1043 ****
                          miocnak(q, mp, 0, EINVAL);
                          return;
                  }
  
                  /*
!                  * Send an M_PCSIG message up the slave's read side and
!                  * respond back to the master with an ACK or NAK as
                   * appropriate.
                   */
                  if (putnextctl1(q, M_PCSIG, sig) == 0) {
                          miocnak(q, mp, 0, EAGAIN);
                          return;
--- 1033,1044 ----
                          miocnak(q, mp, 0, EINVAL);
                          return;
                  }
  
                  /*
!                  * Send an M_PCSIG message up the subsidiary's read side and
!                  * respond back to the manager with an ACK or NAK as
                   * appropriate.
                   */
                  if (putnextctl1(q, M_PCSIG, sig) == 0) {
                          miocnak(q, mp, 0, EAGAIN);
                          return;