diff options
Diffstat (limited to 'usr/src/uts/common/io/ptm.c')
-rw-r--r-- | usr/src/uts/common/io/ptm.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/usr/src/uts/common/io/ptm.c b/usr/src/uts/common/io/ptm.c index dc6c4e64ad..54bcee88bc 100644 --- a/usr/src/uts/common/io/ptm.c +++ b/usr/src/uts/common/io/ptm.c @@ -22,7 +22,7 @@ * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ @@ -146,9 +146,9 @@ int ptm_debug = 0; static int ptmopen(queue_t *, dev_t *, int, int, cred_t *); static int ptmclose(queue_t *, int, cred_t *); -static void ptmwput(queue_t *, mblk_t *); -static void ptmrsrv(queue_t *); -static void ptmwsrv(queue_t *); +static int ptmwput(queue_t *, mblk_t *); +static int ptmrsrv(queue_t *); +static int ptmwsrv(queue_t *); /* * Master Stream Pseudo Terminal Module: stream data structure definitions @@ -165,7 +165,7 @@ static struct module_info ptm_info = { static struct qinit ptmrint = { NULL, - (int (*)()) ptmrsrv, + ptmrsrv, ptmopen, ptmclose, NULL, @@ -174,8 +174,8 @@ static struct qinit ptmrint = { }; static struct qinit ptmwint = { - (int (*)()) ptmwput, - (int (*)()) ptmwsrv, + ptmwput, + ptmwsrv, NULL, NULL, NULL, @@ -462,7 +462,7 @@ ptmptsopencb(ptmptsopencb_arg_t arg) /* * The wput procedure will only handle ioctl and flush messages. */ -static void +static int ptmwput(queue_t *qp, mblk_t *mp) { struct pt_ttys *ptmp; @@ -520,7 +520,7 @@ ptmwput(queue_t *qp, mblk_t *mp) DBG(("got M_IOCTL but no slave\n")); miocnak(qp, mp, 0, EINVAL); PT_EXIT_READ(ptmp); - return; + return (0); } (void) putq(qp, mp); break; @@ -642,7 +642,7 @@ ptmwput(queue_t *qp, mblk_t *mp) qreply(qp, mp); } PT_EXIT_READ(ptmp); - return; + return (0); } DBG(("put msg on master's write queue\n")); (void) putq(qp, mp); @@ -650,6 +650,7 @@ ptmwput(queue_t *qp, mblk_t *mp) } DBG(("return from ptmwput()\n")); PT_EXIT_READ(ptmp); + return (0); } @@ -658,7 +659,7 @@ ptmwput(queue_t *qp, mblk_t *mp) * slave to send any messages queued on its write side to * the read side of this master. */ -static void +static int ptmrsrv(queue_t *qp) { struct pt_ttys *ptmp; @@ -673,6 +674,7 @@ ptmrsrv(queue_t *qp) } PT_EXIT_READ(ptmp); DBG(("leaving ptmrsrv\n")); + return (0); } @@ -682,11 +684,11 @@ ptmrsrv(queue_t *qp) * cannot be sent, leave them on this queue. If priority * messages on this queue, send them to slave no matter what. */ -static void +static int ptmwsrv(queue_t *qp) { struct pt_ttys *ptmp; - mblk_t *mp; + mblk_t *mp; DBG(("entering ptmwsrv\n")); ASSERT(qp->q_ptr); @@ -696,7 +698,7 @@ ptmwsrv(queue_t *qp) if ((mp = getq(qp)) == NULL) { /* If there are no messages there's nothing to do. */ DBG(("leaving ptmwsrv (no messages)\n")); - return; + return (0); } PT_ENTER_READ(ptmp); @@ -723,7 +725,7 @@ ptmwsrv(queue_t *qp) qreply(qp, mp); } PT_EXIT_READ(ptmp); - return; + return (0); } /* * while there are messages on this write queue... @@ -748,4 +750,5 @@ ptmwsrv(queue_t *qp) } while ((mp = getq(qp)) != NULL); DBG(("leaving ptmwsrv\n")); PT_EXIT_READ(ptmp); + return (0); } |