diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-10-01 07:12:31 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-10-01 07:12:31 +0000 |
commit | fdf9f8ea0fba1b3be5ce886afbd3c2898ffb7b2a (patch) | |
tree | b47549b798cccabbc008d56c4ecef4798d32e469 /share | |
parent | 3bf2744db36f9461607a9408d23a0a9016d4905e (diff) |
More manpage cleaning:
- coherent .Xr
- fix or add .Cd lines, fix device nodes names, etc.
- put sections in right order
- coherent ``frame buffer'' spelling
- KNF code examples (open("foo",1) my ass)
- provide an hp300 specific sd(4) as hp300 does not use the regular scsi
subsystem (...yet).
- .Bx -> .Ox whenever appropriate
- other various random sweeping
ok deraadt@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/man4.hp300/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/apci.4 | 5 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/cons.4 | 21 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/ct.4 | 10 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/dca.4 | 14 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/dcm.4 | 5 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/dv.4 | 77 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/gb.4 | 77 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/grf.4 | 110 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/hd.4 | 24 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/hil.4 | 32 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/intro.4 | 50 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/ite.4 | 31 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/le.4 | 26 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/ppi.4 | 20 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/rb.4 | 71 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/sd.4 | 156 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/st.4 | 9 | ||||
-rw-r--r-- | share/man/man4/man4.hp300/tc.4 | 75 |
19 files changed, 446 insertions, 371 deletions
diff --git a/share/man/man4/man4.hp300/Makefile b/share/man/man4/man4.hp300/Makefile index 02959603e81..c3d26433e35 100644 --- a/share/man/man4/man4.hp300/Makefile +++ b/share/man/man4/man4.hp300/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.6 2001/06/20 16:27:28 mpech Exp $ +# $OpenBSD: Makefile,v 1.7 2002/10/01 07:12:30 miod Exp $ # from: @(#)Makefile 5.1 (Berkeley) 6/29/90 MAN= apci.4 autoconf.4 cons.4 ct.4 dca.4 dcm.4 dv.4 gb.4 grf.4 \ - hd.4 hil.4 intro.4 ite.4 le.4 mem.4 ppi.4 rb.4 tc.4 + hd.4 hil.4 intro.4 ite.4 le.4 mem.4 ppi.4 rb.4 sd.4 tc.4 MLINKS= mem.4 kmem.4 MANSUBDIR=hp300 diff --git a/share/man/man4/man4.hp300/apci.4 b/share/man/man4/man4.hp300/apci.4 index 85b46cfa90d..4fe3484b364 100644 --- a/share/man/man4/man4.hp300/apci.4 +++ b/share/man/man4/man4.hp300/apci.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: apci.4,v 1.2 2001/10/05 14:45:53 mpech Exp $ +.\" $OpenBSD: apci.4,v 1.3 2002/10/01 07:12:30 miod Exp $ .\ .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -75,6 +75,9 @@ The single-character input has overflowed and incoming data has been lost. .El .Sh SEE ALSO +.Xr dca 4 , +.Xr dcm 4 , +.Xr intro 4 , .Xr tty 4 .Sh BUGS Much of the code in the diff --git a/share/man/man4/man4.hp300/cons.4 b/share/man/man4/man4.hp300/cons.4 index 71badd72df9..714e6564726 100644 --- a/share/man/man4/man4.hp300/cons.4 +++ b/share/man/man4/man4.hp300/cons.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: cons.4,v 1.4 2001/05/11 01:24:19 millert Exp $ +.\" $OpenBSD: cons.4,v 1.5 2002/10/01 07:12:30 miod Exp $ .\ .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -55,22 +55,31 @@ messages and accessed in user mode via It is virtual in the sense that it is attached to a hardware interface at boot time. Currently the choices are limited to: -a bit-mapped display acting as an +a bit-mapped display +.Pq Xr grf 4 +acting as an .Em internal terminal emulator .Dq Tn ITE , -the built-in serial interface -.Xr dca 4 , +a serial interface +.Pq Xr apci 4 \ or Xr dca 4 , or a .Xr null 4 -console in that order. +console, in that order. .Sh FILES .Bl -tag -width /dev/console .It Pa /dev/console .El .Sh SEE ALSO +.Xr apci 4 , +.Xr dca 4 , +.Xr grf 4 , +.Xr intro 4 , +.Xr ite 4 , .Xr tty 4 , .Xr reboot 8 .Sh BUGS -You should be able to specify potential console devices at +.\" option CONSCODE="#" does this, but does not work on apci - needs to be +.\" fixed first. +It should be possible to specify potential console devices at .Xr config 8 time. diff --git a/share/man/man4/man4.hp300/ct.4 b/share/man/man4/man4.hp300/ct.4 index 3ab79fa9559..02fde39b126 100644 --- a/share/man/man4/man4.hp300/ct.4 +++ b/share/man/man4/man4.hp300/ct.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ct.4,v 1.6 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: ct.4,v 1.7 2002/10/01 07:12:30 miod Exp $ .\ .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -100,9 +100,11 @@ through refer to streaming no-rewind interfaces. .Sh SEE ALSO .Xr mt 1 , -.Xr tar 1 , -.Xr tp 1 , -.Xr mtio 4 +.Xr hd 4 , +.Xr intro 4 , +.Xr mtio 4 , +.Xr sd 4 , +.Xr st 4 .Sh BUGS Read and writes of less than 1024 bytes will not behave as expected. The 9145 device is currently treated as a 9144. diff --git a/share/man/man4/man4.hp300/dca.4 b/share/man/man4/man4.hp300/dca.4 index f92e02af452..362f73e3bb4 100644 --- a/share/man/man4/man4.hp300/dca.4 +++ b/share/man/man4/man4.hp300/dca.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dca.4,v 1.5 2001/09/23 05:55:25 millert Exp $ +.\" $OpenBSD: dca.4,v 1.6 2002/10/01 07:12:30 miod Exp $ .\ .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -46,7 +46,8 @@ .Tn HP 98644A serial communications interface .Sh SYNOPSIS -.Cd "dca0 at dio? scode 9 flags 1" +.Cd "dca0 at dio? scode 9 flags 1" Pq "on-board serial interfaces" +.Cd "dca* at dio? scode ?" .Sh DESCRIPTION The .Tn 98644A @@ -68,8 +69,8 @@ may be set to 1 if the line should be treated as hard-wired with carrier always present or 0 if modem control is desired. .Sh FILES .Bl -tag -width Pa -.It Pa /dev/tty0 -.It Pa /dev/cua0 +.It Pa /dev/tty[0-3] +.It Pa /dev/cua[0-3] .El .Sh DIAGNOSTICS .Bl -diag @@ -79,10 +80,13 @@ The single-character input has overflowed and incoming data has been lost. .El .Sh SEE ALSO +.Xr apci 4 , +.Xr dcm 4 , +.Xr intro 4 , .Xr tty 4 .Sh BUGS Data loss is possible on busy systems with baud rates greater than 300. The -.Nm dca +.Nm has never been tested with modem control enabled or on anything but the built-in interface. diff --git a/share/man/man4/man4.hp300/dcm.4 b/share/man/man4/man4.hp300/dcm.4 index 4d4c5b0b9fc..40f85ded24a 100644 --- a/share/man/man4/man4.hp300/dcm.4 +++ b/share/man/man4/man4.hp300/dcm.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dcm.4,v 1.7 2001/10/05 14:45:53 mpech Exp $ +.\" $OpenBSD: dcm.4,v 1.8 2002/10/01 07:12:30 miod Exp $ .\ .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -96,6 +96,9 @@ The 3 character buffer in the uart has overflowed. .El .Sh SEE ALSO +.Xr apci 4 , +.Xr dca 4 , +.Xr intro 4 , .Xr tty 4 .Sh BUGS Total throughput per card, all ports together, is limited to 76800 bits per diff --git a/share/man/man4/man4.hp300/dv.4 b/share/man/man4/man4.hp300/dv.4 index f1481e1bd48..2b78047c360 100644 --- a/share/man/man4/man4.hp300/dv.4 +++ b/share/man/man4/man4.hp300/dv.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: dv.4,v 1.6 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: dv.4,v 1.7 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,11 @@ .Nm dv .Nd .Tn HP98730 -``DaVinci'' device interface +``DaVinci'' frame buffer +.Sh SYNOPSIS +.Cd "dvbox* at intio?" +.Cd "dvbox* at dio? scode ?" +.Cd "grf* at dvbox?" .Sh DESCRIPTION This driver is for the .Tn HP98730 @@ -74,7 +78,7 @@ calls supported, refer to .Tn HP-UX manuals. The -.Bx +.Ox calls supported are: .Bl -tag -width indent .It Dv GRFIOCGINFO @@ -83,7 +87,7 @@ Get Graphics Info Get info about device, setting the entries in the .Ar grfinfo structure, as defined in -.Aq Pa hpdev/grfioctl.h . +.Aq Pa machine/grfioctl.h . For the standard 98730, the number of planes should be 4. The number of colors would therefore be 15, excluding black. If one 98732A frame buffer board is installed, there will still be 4 planes, @@ -111,64 +115,51 @@ Map Device to user space Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. The structure describing the 98730 is defined in -.Aq Pa hpdev/grf_dvreg.h . +.Aq Pa machine/grf_dvreg.h . +.El +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +special file .El .Sh EXAMPLES This is a short segment of code showing how the device is opened and mapped into user process address space assuming that it is .Ql grf0 : -.Bd -literal -offset indent +.Bd -literal struct dvboxfb *dvbox; u_char *Addr, frame_buffer; struct grfinfo gi; int disp_fd; -disp_fd = open("/dev/grf0",1); +disp_fd = open("/dev/grf0", O_WRONLY); -if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; -(void) ioctl (disp_fd, GRFIOCON, 0); +ioctl(disp_fd, GRFIOCON, 0); -Addr = (u_char *) 0; -if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { -(void) ioctl (disp_fd, GRFIOCOFF, 0); -return -1; +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl(disp_fd, GRFIOCOFF, 0); + return -1; } -dvbox = (dvboxfb *) Addr; /* Control Registers */ -frame_buffer=(u_char *)Addr+gi.gd_regsize; /* Frame buffer memory */ +dvbox = (dvboxfb *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer memory */ .Ed -.Sh FILES -.Bl -tag -width /dev/MAKEDEV.hpux -compact -.It Pa /dev/grf? -.Bx -special file -.It Pa /dev/crt98730 -.It Pa /dev/ocrt98730 -.Tn HP-UX -.Em starbase -special files -.It Pa /dev/MAKEDEV.hpux -script for creating -.Tn HP-UX -special files -.El .Sh DIAGNOSTICS None under -.Bx . +.Ox . +The .Tn HP-UX -.Tn CE.utilities -must be used. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid ioctl specification. -.El +.Tn CE.utilities/Crtadjust +programs must be used. .Sh SEE ALSO .Xr ioctl 2 , -.Xr grf 4 +.Xr grf 4 , +.Xr gb 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr rb 4 , +.Xr tc 4 .Sh BUGS Not tested for all configurations of scan board and frame buffer memory boards. diff --git a/share/man/man4/man4.hp300/gb.4 b/share/man/man4/man4.hp300/gb.4 index 580edee7afd..7755489f170 100644 --- a/share/man/man4/man4.hp300/gb.4 +++ b/share/man/man4/man4.hp300/gb.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: gb.4,v 1.5 2001/10/05 14:45:53 mpech Exp $ +.\" $OpenBSD: gb.4,v 1.6 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,11 @@ .Nm gb .Nd .Tn HP98700 -``Gatorbox'' device interface +``Gatorbox'' frame buffer +.Sh SYNOPSIS +.Cd "gbox* at intio?" +.Cd "gbox* at dio? scode ?" +.Cd "grf* at gbox?" .Sh DESCRIPTION This driver is for the .Tn HP98700 @@ -87,7 +91,7 @@ contains further configuration information. The .Xr ioctl 2 calls supported by the -.Bx +.Ox system for the Gatorbox are: .Bl -tag -width indent .It Dv GRFIOCGINFO @@ -96,7 +100,7 @@ Get Graphics Info Get info about device, setting the entries in the .Em grfinfo structure, as defined in -.Aq Pa hpdev/grfioctl.h . +.Aq Pa machine/grfioctl.h . For the standard 98700, the number of planes should be 4. The number of colors would therefore be 15, excluding black. With the 98701 option installed there will be another 4 planes for a total of 8, @@ -119,70 +123,57 @@ are not affected. .It Dv GRFIOCMAP Map Device to user space .Pp -Map in control registers and framebuffer space. +Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. The frame buffer structure describing the 98700 is given in -.Aq Pa hpdev/grf_gbreg.h . +.Aq Pa machine/grf_gbreg.h . .It Dv GRFIOCUNMAP Unmap Device .Pp -Unmap control registers and framebuffer space. +Unmap control registers and frame buffer space. .Pp For further information about the use of ioctl see the man page. .El +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +special file +.El .Sh EXAMPLES A small example of opening, mapping and using the device is given below. -For more examples of the details on the behavior of the device, see the device -dependent source files for the X Window System, in the -.Pa /usr/src/new/X/libhp.fb -directory. -.Bd -literal -offset indent +.Bd -literal struct gboxfb *gbox; u_char *Addr, frame_buffer; struct grfinfo gi; int disp_fd; -disp_fd = open("/dev/grf0",1); +disp_fd = open("/dev/grf0", O_WRONLY); -if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; -(void) ioctl (disp_fd, GRFIOCON, 0); +ioctl(disp_fd, GRFIOCON, 0); -Addr = (u_char *) 0; -if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { -(void) ioctl (disp_fd, GRFIOCOFF, 0); -return -1; +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl (disp_fd, GRFIOCOFF, 0); + return -1; } -gbox = (gboxfb *) Addr; /* Control Registers */ -frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ +gbox = (gboxfb *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer memory */ .Ed -.Sh FILES -.Bl -tag -width /dev/crt98700 -compact -.It Pa /dev/grf? -.Bx -special file -.It Pa /dev/crt98700 -.Tn HP-UX -.Em starbase -special file -.El .Sh DIAGNOSTICS None under -.Bx . -.Tn HP-UX +.Ox . The +.Tn HP-UX .Tn CE.utilities/Crtadjust programs must be used. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid ioctl specification. -.El .Sh SEE ALSO .Xr ioctl 2 , -.Xr grf 4 +.Xr dv 4 , +.Xr grf 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr rb 4 , +.Xr tc 4 diff --git a/share/man/man4/man4.hp300/grf.4 b/share/man/man4/man4.hp300/grf.4 index b368ff4598a..b867ace28cc 100644 --- a/share/man/man4/man4.hp300/grf.4 +++ b/share/man/man4/man4.hp300/grf.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: grf.4,v 1.6 2001/10/05 14:45:53 mpech Exp $ +.\" $OpenBSD: grf.4,v 1.7 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,6 +45,14 @@ .Nd .Tn HP graphics frame buffer device interface +.Sh SYNOPSIS +.Cd "grf* at dvbox?" +.Cd "grf* at gbox?" +.Cd "grf* at hyper?" +.Cd "grf* at rbox?" +.Cd "grf* at topcat?" +.Pp +.Cd "ite* at grf?" .Sh DESCRIPTION This is a generic description of the frame buffer device interface. The devices to which this applies are the 98544, 98545 and 98547 @@ -60,38 +68,6 @@ Renaissance graphics box, and the 98730 DaVinci graphics box. .Pp -Use of the devices can be effectively approached from two directions. -The first is through -.Tn HP-UX -.Em Starbase -routines, the second is by direct control in the -.Bx -environment. -In order to use the Starbase libraries, -code must be compiled in an -.Tn HP-UX -environment, either by doing so on an -.Tn HP-UX -machine and transferring the binaries to the -.Bx -machine, or by compilation -with the use of the -.Xr hpux 1 -command. -Applications using Starbase libraries have been run successfully -on -.Bx -machines using both of these compilation techniques. -.Pp -Direct compilation, -such as that used for the X Window System servers, has also been successful. -Examples of some frame buffer operations can be found in -the device dependent X Window system sources, for example the -.Pa /usr/src/new/X/libhp.fb -directory. -These files contain examples of device dependent color map initialization, -frame buffer operations, bit moving routines etc. -.Pp The basic programming of the .Nm grf Ns ? devices involves opening the device @@ -101,7 +77,7 @@ The address mapping is controlled by an .Xr ioctl 2 call to map the device into user space, and an unmap call when finished. The ioctls supported by -.Bx +.Ox are: .Bl -tag -width indent .It Dv GRFIOCGINFO @@ -109,7 +85,8 @@ Get Graphics Info .Pp Get info about device, setting the entries in the .Em grfinfo -structure, as defined in <hpdev/grfioctl.h>: +structure, as defined in +.Aq Pa machine/grfioctl.h : .Bd -literal struct grfinfo { int gd_id; /* HPUX identifier */ @@ -145,69 +122,58 @@ are not affected. .It Dv GRFIOCMAP Map Device to user space .Pp -Map in control registers and framebuffer space. +Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. .It Dv GRFIOCUNMAP Unmap Device .Pp -Unmap control registers and framebuffer space. +Unmap control registers and frame buffer space. .El .Pp For further information about the use of ioctl see the man page. +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +interface special files +.El .Sh EXAMPLES This short code fragment is an example of opening some graphics device and mapping in the control and frame buffer space: .Bd -literal #define GRF_DEV <some_graphics_device> /* /dev/grfN */ -{ - struct fbstruct *regs; /* fbstruct = gboxfb, rboxfb, etc. */ - u_char *Addr, frame_buffer; - struct grfinfo gi; - int disp_fd; - disp_fd = open(GRF_DEV,1); - if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; - (void) ioctl (disp_fd, GRFIOCON, 0); +struct fbstruct *regs; /* fbstruct = gboxfb, rboxfb, etc. */ +u_char *Addr, frame_buffer; +struct grfinfo gi; +int disp_fd; + +disp_fd = open(GRF_DEV, O_WRONLY); +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +ioctl(disp_fd, GRFIOCON, 0); - Addr = (u_char *) 0; - if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { - (void) ioctl (disp_fd, GRFIOCOFF, 0); - return -1; - } - regs = (fbstruct *) Addr; /* Control Registers */ - frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer mem */ +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl(disp_fd, GRFIOCOFF, 0); + return -1; } +regs = (fbstruct *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer mem */ .Ed -.Sh FILES -.Bl -tag -width /dev/*crt*? -compact -.It Pa /dev/grf? -.Bx -interface special files -.It Pa /dev/*crt* -.Tn HP-UX -.Em starbase -interface special files -.El .Sh DIAGNOSTICS None under -.Bx . +.Ox . .Tn HP-UX The .Tn CE.utilities/Crtadjust programs must be used for each specific device. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid ioctl specification. -.El .Sh SEE ALSO .Xr ioctl 2 , +.Xr cons 4 , .Xr dv 4 , .Xr gb 4 , .Xr hil 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr ite 4 , .Xr rb 4 , .Xr tc 4 diff --git a/share/man/man4/man4.hp300/hd.4 b/share/man/man4/man4.hp300/hd.4 index 673d1cc6fe5..e14cdef6134 100644 --- a/share/man/man4/man4.hp300/hd.4 +++ b/share/man/man4/man4.hp300/hd.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hd.4,v 1.3 2001/10/05 14:45:53 mpech Exp $ +.\" $OpenBSD: hd.4,v 1.4 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,14 +57,6 @@ drives are supported, but others can easily be added by adding tables to the driver. It is a typical block-device driver; see .Xr physio 9 . -.Pp -The script -.Xr MAKEDEV 8 -should be used to create the -.Nm hd -special files; consult -.Xr mknod 8 -if a special file needs to be made manually. .Sh DISK SUPPORT The driver interrogates the controller to determine the type of drive attached. @@ -93,7 +85,8 @@ to which also corresponds to a minor device number sets: zero to seven, eight to 15, 16 to 23 and so forth for drive zero, drive two and drive three respectively -(see physio 9 ) . +(see +.Xr physio 9 ) . The location and size (in sectors) of the partitions for these drives: .Bl -column header diskx undefined length @@ -286,10 +279,10 @@ The final layout is intended for a large, single file system second disk. It is also used when writing out the boot program since it is the only partition mapping the bootblock area. .Sh FILES -.Bl -tag -width /dev/rhd[0-7][a-h] -compact -.It Pa /dev/hd[0-7][a-h] +.Bl -tag -width /dev/rhd[0-7][a-p] -compact +.It Pa /dev/hd[0-7][a-p] block files -.It Pa /dev/rhd[0-7][a-h] +.It Pa /dev/rhd[0-7][a-p] raw files .El .Sh DIAGNOSTICS @@ -298,6 +291,11 @@ raw files An unrecoverable data error occurred during transfer of the specified block on the specified disk. .El +.Sh SEE ALSO +.Xr ct 4 , +.Xr intro 4 , +.Xr sd 4 , +.Xr st 4 .Sh BUGS The current disk partitioning is totally bogus. .Tn CS/80 diff --git a/share/man/man4/man4.hp300/hil.4 b/share/man/man4/man4.hp300/hil.4 index a05fde8114d..922c14440b6 100644 --- a/share/man/man4/man4.hp300/hil.4 +++ b/share/man/man4/man4.hp300/hil.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: hil.4,v 1.8 2002/06/30 21:45:25 deraadt Exp $ +.\" $OpenBSD: hil.4,v 1.9 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -157,7 +157,7 @@ is used to control the .Tn HIL device. The ioctl commands (see -.Aq Pa hpdev/hilioctl.h ) +.Aq Pa machine/hilioctl.h ) listed below are separated into two groups. The first are those which provide functions identical to .Tn HP-UX . @@ -268,12 +268,12 @@ Allocate and map into user space, an .Tn HILQ structure as defined in -.Aq Pa hpdev/hilioctl.h . +.Aq Pa machine/hilioctl.h . .Ar Arg is a pointer to a .Ar hilqinfo structure (also described in -.Aq Pa hpdev/hilioctl.h ) +.Aq Pa machine/hilioctl.h ) consisting of a .Pa qid and an @@ -356,23 +356,7 @@ Individual .Tn HIL loop devices. .El -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such HIL loop device. -.It Bq Er ENXIO -HIL loop is inoperative. -.It Bq Er EBUSY -Another HP-UX process has the device open, or another -.Bx -process has the -device open, and is using it in -.Tn HP-UX -mode. -.It Bq Er EINVAL -Invalid -.Xr ioctl 2 -specification. -.It Bq Er EMFILE -No more shared queues available. -.El +.Sh SEE ALSO +.Xr ioctl 2 , +.Xr intro 4 , +.Xr ite 4 diff --git a/share/man/man4/man4.hp300/intro.4 b/share/man/man4/man4.hp300/intro.4 index 70af7ca4cf5..2a840337ddf 100644 --- a/share/man/man4/man4.hp300/intro.4 +++ b/share/man/man4/man4.hp300/intro.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: intro.4,v 1.10 2002/03/29 22:46:00 jason Exp $ +.\" $OpenBSD: intro.4,v 1.11 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -109,43 +109,69 @@ for example, new drives. .Pp .Bl -tag -width hpib(4) -compact -offset indent +.It Xr apci 4 +Apollo utility chip serial interface. .It Xr ct 4 7946/9144 CS/80 cartridge tape. .It Xr dca 4 98644 built-in serial interface. .It Xr dcm 4 HP 98642A communications multiplexer. -.It Xr dma 4 -98620B DMA controller. +.\" .It Xr dio 4 +.\" DIO/DIO-II bus. .It Xr dv 4 -HP98730 ``DaVinci'' device interface. +HP98730 ``DaVinci'' frame buffer. .It Xr gb 4 -HP98700 ``Gatorbox'' device interface. +HP98700 ``Gatorbox'' frame buffer. .It Xr grf 4 Topcat/Gatorbox/Renaissance frame buffer. +.It Xr hd 4 +CS/80 disk interface. .It Xr hil 4 HIL interface. -.It Xr hpib 4 -Built-in and 98625 HP-IB interface. +.\" .It Xr hpib 4 +.\" Built-in and 98625 HP-IB interface. +.\" .It Xr hyper 4 +.\" Hyperion frame buffer. .It Xr ite 4 HP Internal Terminal Emulator. .It Xr le 4 98643 Lance-based ethernet interface. +.\" .It Xr oscsi +.\" Old HP300 SCSI driver. .It Xr ppi 4 HP-IB printer/plotter interface. .It Xr rb 4 HP98720 ``Renaissance'' device interface. -.It Xr rd 4 -CS/80 disk interface. -.It Xr rmp 4 -HP Remote Maintenance Protocol family. +.It Xr sd 4 +SCSI disk drives. .It Xr st 4 -CCS SCSI tape drive. +CCS SCSI tape drives. .It Xr tc 4 HP98544-98550 ``Topcat'' and ``Catseye'' device interface. .El .Sh SEE ALSO +.Xr apci 4 , .Xr autoconf 4 , +.Xr ct 4 , +.Xr dca 4 , +.Xr dcm 4 , +.\" .Xr dio 4 , +.Xr dv 4 , +.Xr gb 4 , +.Xr grf 4 , +.Xr hd 4 , +.Xr hil 4 , +.\" .Xr hpib 4 , +.\" .Xr hyper 4 , +.Xr ite 4 , +.Xr le 4 , +.\" .Xr oscsi 4 , +.Xr ppi 4 , +.Xr rb 4 , +.Xr sd 4 , +.Xr st 4 , +.Xr tc 4 , .Xr config 8 .Sh HISTORY The diff --git a/share/man/man4/man4.hp300/ite.4 b/share/man/man4/man4.hp300/ite.4 index 59ac668fd7c..1c969ae77f7 100644 --- a/share/man/man4/man4.hp300/ite.4 +++ b/share/man/man4/man4.hp300/ite.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ite.4,v 1.4 2001/05/11 01:24:20 millert Exp $ +.\" $OpenBSD: ite.4,v 1.5 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -45,13 +45,16 @@ .Nd .Tn HP Internal Terminal Emulator +.Sh SYNOPSIS +.Cd "ite* at grf?" .Sh DESCRIPTION .Tn TTY -special files of the form ``ttye?'' +special files of the form +.Pa /dev/ttye? are interfaces to the .Tn HP ITE for bit-mapped displays as implemented under -.Bx . +.Ox . An .Tn ITE is the main system console on most @@ -95,16 +98,6 @@ device to use as the system console .Pq Pa /dev/console . If a display exists at any hardware address, it will be the console. -The kernel looks for, in order: -a 98544, 98545, or 98547 Topcat display, -a 98700 Gatorbox at a supported address (see -.Xr gb 4 ) , -or a 98720 Renaissance at a supported address (see -.Xr rb 4 ) . -Currently there is no -.Tn ITE -support for the -98548, 98549, 98550 and 98556 boards. .Pp When activated as an .Tn ITE @@ -149,19 +142,17 @@ that is, write over whatever may be on the display. When the graphics application is finished and .Pa /dev/grf0 -closed, -the +closed, the .Tn ITE -will be reinitialized with the frame buffer cleared -and the +will be reinitialized with the frame buffer cleared and the .Tn ITE colormap installed. -.Sh DIAGNOSTICS -None under -.Bx . .Sh SEE ALSO +.Xr cons 4 , +.Xr dv 4 , .Xr gb 4 , .Xr grf 4 , .Xr hil 4 , +.Xr intro 4 , .Xr rb 4 , .Xr tc 4 diff --git a/share/man/man4/man4.hp300/le.4 b/share/man/man4/man4.hp300/le.4 index 9b8eb925294..b1c39fcfbfb 100644 --- a/share/man/man4/man4.hp300/le.4 +++ b/share/man/man4/man4.hp300/le.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: le.4,v 1.5 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: le.4,v 1.6 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -82,25 +82,11 @@ by setting the flag with an .Dv SIOCSIFFLAGS .Xr ioctl 2 . -.Sh DIAGNOSTICS -.Bl -diag -.It le%d: hardware address %s. -This is a normal autoconfiguration message noting the 6 byte physical -ethernet address of the adapter. -.Pp -.It de%d: can't handle af%d. -The interface was handed -a message with addresses formatted in an unsuitable address -family; the packet was dropped. -.Pp -The following message indicates a possible hardware error performing -the indicated operation during autoconfiguration or initialization. -.Pp -.It le%d: init timeout, stat = 0x%x. -The hardware did not respond to an initialize command during reset. -The reset procedure continues anyway. -.El .Sh SEE ALSO .Xr arp 4 , +.Xr ifmedia 4 , .Xr inet 4 , -.Xr intro 4 +.Xr intro 4 , +.Xr netintro 4 , +.Xr hostname.if 5 , +.Xr ifconfig 8 diff --git a/share/man/man4/man4.hp300/ppi.4 b/share/man/man4/man4.hp300/ppi.4 index 8a9e769b770..8ebf53afea5 100644 --- a/share/man/man4/man4.hp300/ppi.4 +++ b/share/man/man4/man4.hp300/ppi.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ppi.4,v 1.3 2001/05/11 01:24:20 millert Exp $ +.\" $OpenBSD: ppi.4,v 1.4 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,23 +57,21 @@ printers and plotters. Special files .Pa ppi0 through -.Pa ppi7 +.Pa ppi3 are used to access the devices, with the digit at the end of the filename referring to the bus address of the device. Current versions of the autoconf code can not probe for these devices, so the device entry in the configuration file must be fully qualified. -.Pp -The device files appear as follows: -.Bd -literal -offset indent -"crw-rw-rw- 1 root 11, 0 Dec 21 11:22 /dev/ppi" -.Ed -.Sh DIAGNOSTICS -None. +.Sh FILES +.Bl -tag -width /dev/ppi[0-3] -compact +.It Pa /dev/ppi[0-3] +.El .Sh SEE ALSO -.Xr hpib 4 +.\" .Xr hpib 4 , +.Xr intro 4 .Sh BUGS This driver is very primitive, it handshakes data out byte by byte. It should use .Tn DMA -if possible. +whenever possible. diff --git a/share/man/man4/man4.hp300/rb.4 b/share/man/man4/man4.hp300/rb.4 index 98ac4c926f4..101c5ed8534 100644 --- a/share/man/man4/man4.hp300/rb.4 +++ b/share/man/man4/man4.hp300/rb.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: rb.4,v 1.5 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: rb.4,v 1.6 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,7 @@ .Nm rb .Nd .Tn HP98720 -``Renaissance'' device interface +``Renaissance'' frame buffer .Sh DESCRIPTION This driver is for the .Tn HP98720 @@ -83,7 +83,7 @@ Get Graphics Info Get info about device, setting the entries in the .Ar grfinfo structure, as defined in -.Aq Pa hpdev/grfioctl.h . +.Aq Pa machine/grfioctl.h . For the standard 98720, the number of planes should be 4. The number of colors would therefore be 15, excluding black. If one 98722A frame buffer board is installed, there will still @@ -108,10 +108,16 @@ are not affected. .It Dv GRFIOCMAP Map Device to user space .Pp -Map in control registers and framebuffer space. +Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. The structure describing the 98720 is defined in -.Pa hpdev/grf_rbreg.h . +.Aq Pa machine/grf_rbreg.h . +.El +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +special file .El .Sh EXAMPLES This is a short segment of code showing how the device is opened and mapped @@ -122,56 +128,33 @@ u_char *Addr, frame_buffer; struct grfinfo gi; int disp_fd; -disp_fd = open("/dev/grf0",1); +disp_fd = open("/dev/grf0", O_WRONLY); -if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; -(void) ioctl (disp_fd, GRFIOCON, 0); +ioctl(disp_fd, GRFIOCON, 0); -Addr = (u_char *) 0; -if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { - (void) ioctl (disp_fd, GRFIOCOFF, 0); +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl(disp_fd, GRFIOCOFF, 0); return -1; } -rbox = (rboxfb *) Addr; /* Control Registers */ -frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ +rbox = (rboxfb *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer memory */ .Ed -.Sh FILES -.Bl -tag -width /dev/MAKEDEV.hpux -compact -.It Pa /dev/grf? -.Bx -special file -.It Pa /dev/crt98720 -.It Pa /dev/ocrt98720 -.Tn HP-UX -.Em starbase -special files -.It Pa /dev/MAKEDEV.hpux -script for creating -.Tn HP-UX -special files -.El .Sh DIAGNOSTICS None under -.Bx . +.Ox . The .Tn HP-UX -.Tn CE.utilities -must be used. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid ioctl specification. -.El +.Tn CE.utilities/Crtadjust +programs must be used. .Sh SEE ALSO .Xr ioctl 2 , -.Xr grf 4 -.Pp -For extensive code examples using the -Renaissance, see the X device dependent source. +.Xr dv 4 , +.Xr gb 4 , +.Xr grf 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr tc 4 .Sh BUGS Not tested for all configurations of scan board and frame buffer memory boards. diff --git a/share/man/man4/man4.hp300/sd.4 b/share/man/man4/man4.hp300/sd.4 new file mode 100644 index 00000000000..ecae8c138e1 --- /dev/null +++ b/share/man/man4/man4.hp300/sd.4 @@ -0,0 +1,156 @@ +.\" $OpenBSD: sd.4,v 1.1 2002/10/01 07:12:30 miod Exp $ +.\" +.\" Copyright (c) 1996 +.\" Julian Elischer <julian@freebsd.org>. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd January 18, 1996 +.Dt SD 4 hp300 +.Os +.Sh NAME +.Nm sd +.Nd SCSI disk driver +.Sh SYNOPSIS +.Cd "sd* at oscsi? target ? lun ?" +.Sh DESCRIPTION +The +.Nm +driver provides support for a +.Tn SCSI +disk. +It allows the disk to be divided up into a set of pseudo devices called +.Em partitions . +.Pp +When the +.Tn SCSI +adapter is probed during boot, the +.Tn SCSI +bus is scanned for devices. +Any devices found which answer as +.Sq Em Direct +type devices will be attached to the +.Nm +driver. +The devices will be attached as +.Li sdN +devices, matching their +.Tn SCSI +identifiers. +For example, a disk with +.Tn SCSI +id set to 6 will attach as +.Li sd6 . +.Sh PARTITIONING +.Xr disklabel 8 +is used to partition the drive into filesystems. +.Sh IOCTLS +The following +.Xr ioctl 2 +calls apply to +.Tn SCSI +disks as well as to other disks. +They are defined in the header file +.Aq Pa sys/disklabel.h . +.Pp +.Bl -tag -width DIOCSDINFO +.\".It Dv DIOCSBAD +.\"Usually used to set up a bad-block mapping system on the disk. +.\".Tn SCSI +.\"drive incorporate their own bad-block mapping so this command is not +.\"implemented. +.It Dv DIOCGDINFO +Read, from the kernel, the in-core copy of the disklabel for the +drive. +This may be a fictitious disklabel if the drive has never +been initialized, in which case it will contain information read +from the +.Tn SCSI +inquiry commands. +.It Dv DIOCSDINFO +Give the driver a new disklabel to use. +The driver +.Em will not +write the new +disklabel to the disk. +.It Dv DIOCWLABEL +Enable or disable the driver's software +write protect of the disklabel on the disk. +.It Dv DIOCWDINFO +Give the driver a new disklabel to use. +The driver +.Em will +write the new disklabel to the disk. +.It Dv DIOCLOCK +Lock the media cartridge into the device, or unlock a cartridge previously +locked. +Used to prevent user and software eject while the media is in use. +.It Dv DIOCEJECT +Eject the media cartridge from a removable device. +.El +.Pp +In addition, the +.Tn SCSI +general +.Fn ioctl +commands may be used with the +.Nm +driver, but only against the +.Sq Li c +(whole disk) partition. +.Sh NOTES +If a removable device is attached to the +.Nm +driver, then the act of changing the media will invalidate the +disklabel and information held within the kernel. +To avoid corruption, all accesses to the device will be discarded until there +are no more open file descriptors referencing the device. +During this period, all new open attempts will be rejected. +When no more open file descriptors reference the device, the first next +open will load a new set of parameters (including disklabel) for the drive. +.Sh FILES +.Bl -tag -width /dev/rsdXXXXX -compact +.It Pa /dev/sd Ns Ar u Ns Ar p +block mode +.Tn SCSI +disk unit +.Ar u , +partition +.Ar p +.It Pa /dev/rsd Ns Ar u Ns Ar p +raw mode +.Tn SCSI +disk unit +.Ar u , +partition +.Ar p +.Sm off +.El +.Sh SEE ALSO +.Xr ct 4 , +.Xr hd 4 , +.Xr intro 4 , +.\" .Xr oscsi 4 , +.Xr st 4 , +.Xr disklabel 5 , +.Xr disklabel 8 diff --git a/share/man/man4/man4.hp300/st.4 b/share/man/man4/man4.hp300/st.4 index cf8c4b5266e..ca0627856b7 100644 --- a/share/man/man4/man4.hp300/st.4 +++ b/share/man/man4/man4.hp300/st.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: st.4,v 1.8 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: st.4,v 1.9 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -153,8 +153,11 @@ nrst56 X X X X .El .Sh SEE ALSO .Xr mt 1 , -.Xr tar 1 , -.Xr mtio 4 +.Xr ct 4 , +.Xr hd 4 , +.Xr intro 4 , +.Xr mtio 4 , +.Xr sd 4 .Rs .%T EXB-8200 8MM Cartridge Tape Subsystem Interface User Manual. .Re diff --git a/share/man/man4/man4.hp300/tc.4 b/share/man/man4/man4.hp300/tc.4 index 566111a7caa..7e0673fb971 100644 --- a/share/man/man4/man4.hp300/tc.4 +++ b/share/man/man4/man4.hp300/tc.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tc.4,v 1.7 2001/11/13 13:54:26 mpech Exp $ +.\" $OpenBSD: tc.4,v 1.8 2002/10/01 07:12:30 miod Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -44,7 +44,7 @@ .Nm tc .Nd .Tn HP98544 -98550 ``Topcat'' and ``Catseye'' device interface +98550 ``Topcat'' and ``Catseye'' frame buffer .Sh DESCRIPTION This driver is for the .Tn HP98544 , @@ -73,7 +73,7 @@ The device can also be used as a graphics output device. The .Xr ioctl 2 calls supported by the -.Bx +.Ox system for the Topcat are: .Bl -tag -width GRFIOCGINFO .It Dv GRFIOCGINFO @@ -82,7 +82,7 @@ Get Graphics Info Get info about device, setting the entries in the .Ar grfinfo structure, as defined in -.Aq Pa hpdev/grfioctl.h . +.Aq Pa machine/grfioctl.h . For the 98544 or 98549, the number of planes should be 1, as they are monochrome devices. The number of planes for a 98545 is 4, translating to 15 colors, @@ -109,73 +109,54 @@ are not affected. .It Dv GRFIOCMAP Map Device to user space .Pp -Map in control registers and framebuffer space. +Map in control registers and frame buffer space. Once the device file is mapped, the frame buffer structure is accessible. The frame buffer structure describing Topcat/Catseye devices is defined in -.Aq Pa hpdev/grf_tcreg.h . +.Aq Pa machine/grf_tcreg.h . .El .Pp For further information about the use of .Xr ioctl 2 see the man page. +.Sh FILES +.Bl -tag -width /dev/XXXX -compact +.It Pa /dev/grf? +.Ox +special file +.El .Sh EXAMPLES A small example of opening, mapping and using the device is given below. -For more examples of the details on the behavior of the device, see the device -dependent source files for the X Window System, in the -.Pa /usr/src/new/X/libhp -directory. .Bd -literal struct tcboxfb *tc; u_char *Addr, frame_buffer; struct grfinfo gi; int disp_fd; -disp_fd = open("/dev/grf0",1); +disp_fd = open("/dev/grf0", O_WRONLY); -if (ioctl (disp_fd, GRFIOCGINFO, &gi) < 0) return -1; +if (ioctl(disp_fd, GRFIOCGINFO, &gi) < 0) return -1; -(void) ioctl (disp_fd, GRFIOCON, 0); +ioctl(disp_fd, GRFIOCON, 0); -Addr = (u_char *) 0; -if (ioctl (disp_fd, GRFIOCMAP, &Addr) < 0) { - (void) ioctl (disp_fd, GRFIOCOFF, 0); +if (ioctl(disp_fd, GRFIOCMAP, &Addr) < 0) { + ioctl(disp_fd, GRFIOCOFF, 0); return -1; } -tc = (tcboxfb *) Addr; /* Control Registers */ -frame_buffer = (u_char *) Addr + gi.gd_regsize; /* Frame buffer memory */ +tc = (tcboxfb *)Addr; /* Control Registers */ +frame_buffer = (u_char *)Addr + gi.gd_regsize; /* Frame buffer memory */ .Ed -.Sh FILES -.Bl -tag -width /dev/MAKEDEV.hpux -compact -.It Pa /dev/grf? -.Bx -special file -.It Pa /dev/crt9837 -.It Pa /dev/crt98550 -.Tn HP-UX -.Em starbase -special files -.It Pa /dev/MAKEDEV.hpux -script for creating -.Tn HP-UX -special files -.El .Sh DIAGNOSTICS None under -.Bx . +.Ox . +The .Tn HP-UX -.Tn /usr/CE.utilities/Crtadjust +.Tn CE.utilities/Crtadjust programs must be used. -.Sh ERRORS -.Bl -tag -width [EINVAL] -.It Bq Er ENODEV -no such device. -.It Bq Er EBUSY -Another process has the device open. -.It Bq Er EINVAL -Invalid -.Xr ioctl 2 -specification. -.El .Sh SEE ALSO .Xr ioctl 2 , -.Xr grf 4 +.Xr dv 4 , +.Xr gb 4 , +.Xr grf 4 , +.\" .Xr hyper 4 , +.Xr intro 4 , +.Xr rb 4 |