1/* $NetBSD: ibcs2_ioctl.c,v 1.6 1995/03/14 15:12:28 scottb Exp $ */
2
3/*
4 * Copyright (c) 1994, 1995 Scott Bartram
5 * All rights reserved.
6 *
7 * based on compat/sunos/sun_ioctl.c
8 *
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_ioctl.c 91140 2002-02-23 11:12:57Z tanimura $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/consio.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>
36#include <sys/filedesc.h>
--- 510 unchanged lines hidden (view full) ---
547 case IBCS2_JWINSIZE: /* Unix to Jerq I/O control */
548 {
549 struct ibcs2_jwinsize {
550 char bytex, bytey;
551 short bitx, bity;
552 } ibcs2_jwinsize;
553
554 PROC_LOCK(p);
555 SESS_LOCK(p->p_session);
556 ibcs2_jwinsize.bytex = 80;
557 /* p->p_session->s_ttyp->t_winsize.ws_col; XXX */
558 ibcs2_jwinsize.bytey = 25;
559 /* p->p_session->s_ttyp->t_winsize.ws_row; XXX */
560 ibcs2_jwinsize.bitx =
561 p->p_session->s_ttyp->t_winsize.ws_xpixel;
562 ibcs2_jwinsize.bity =
563 p->p_session->s_ttyp->t_winsize.ws_ypixel;
564 SESS_UNLOCK(p->p_session);
565 PROC_UNLOCK(p);
566 error = copyout((caddr_t)&ibcs2_jwinsize, SCARG(uap, data),
567 sizeof(ibcs2_jwinsize));
568 break;
569 }
570
571 /* keyboard and display ioctl's -- type 'K' */
572 case IBCS2_KDGKBMODE: /* get keyboard translation mode */
--- 122 unchanged lines hidden ---
2
3/*
4 * Copyright (c) 1994, 1995 Scott Bartram
5 * All rights reserved.
6 *
7 * based on compat/sunos/sun_ioctl.c
8 *
--- 11 unchanged lines hidden (view full) ---
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/i386/ibcs2/ibcs2_ioctl.c 91140 2002-02-23 11:12:57Z tanimura $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/consio.h>
34#include <sys/fcntl.h>
35#include <sys/file.h>
36#include <sys/filedesc.h>
--- 510 unchanged lines hidden (view full) ---
547 case IBCS2_JWINSIZE: /* Unix to Jerq I/O control */
548 {
549 struct ibcs2_jwinsize {
550 char bytex, bytey;
551 short bitx, bity;
552 } ibcs2_jwinsize;
553
554 PROC_LOCK(p);
555 SESS_LOCK(p->p_session);
556 ibcs2_jwinsize.bytex = 80;
557 /* p->p_session->s_ttyp->t_winsize.ws_col; XXX */
558 ibcs2_jwinsize.bytey = 25;
559 /* p->p_session->s_ttyp->t_winsize.ws_row; XXX */
560 ibcs2_jwinsize.bitx =
561 p->p_session->s_ttyp->t_winsize.ws_xpixel;
562 ibcs2_jwinsize.bity =
563 p->p_session->s_ttyp->t_winsize.ws_ypixel;
564 SESS_UNLOCK(p->p_session);
565 PROC_UNLOCK(p);
566 error = copyout((caddr_t)&ibcs2_jwinsize, SCARG(uap, data),
567 sizeof(ibcs2_jwinsize));
568 break;
569 }
570
571 /* keyboard and display ioctl's -- type 'K' */
572 case IBCS2_KDGKBMODE: /* get keyboard translation mode */
--- 122 unchanged lines hidden ---