diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/grfinfo/Makefile | 15 | ||||
-rw-r--r-- | usr.sbin/grfinfo/grfinfo.1 | 73 | ||||
-rw-r--r-- | usr.sbin/grfinfo/grfinfo.c | 162 | ||||
-rw-r--r-- | usr.sbin/hilinfo/Makefile | 15 | ||||
-rw-r--r-- | usr.sbin/hilinfo/hilinfo.8 | 67 | ||||
-rw-r--r-- | usr.sbin/hilinfo/hilinfo.c | 153 | ||||
-rw-r--r-- | usr.sbin/wsconscfg/Makefile | 16 |
8 files changed, 10 insertions, 495 deletions
diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 0ffcfe343a5..73700219a47 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.113 2004/06/22 07:03:38 henning Exp $ +# $OpenBSD: Makefile,v 1.114 2005/01/14 22:39:35 miod Exp $ .include <bsd.own.mk> @@ -18,7 +18,7 @@ SUBDIR+=faithd ndp rip6query route6d rtadvd rtsold traceroute6 # Arch dependent tools, with manpages SUBDIR+=bad144 apm apmd fdformat memconfig -SUBDIR+=eeprom gpioctl grfinfo hilinfo hotplugd +SUBDIR+=eeprom gpioctl hotplugd SUBDIR+=wsconscfg wsfontload # Extended Attribute tools diff --git a/usr.sbin/grfinfo/Makefile b/usr.sbin/grfinfo/Makefile deleted file mode 100644 index f2b7ac72549..00000000000 --- a/usr.sbin/grfinfo/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2002/09/06 22:08:36 miod Exp $ - -.if ${MACHINE} == "hp300" -PROG= grfinfo -CFLAGS+= -I${.CURDIR}/../../sys/arch/hp300 -DPADD= ${LIBUTIL} -LDADD= -lutil -.else -NOPROG=yes -.endif - -MAN=grfinfo.1 -MANSUBDIR=hp300 - -.include <bsd.prog.mk> diff --git a/usr.sbin/grfinfo/grfinfo.1 b/usr.sbin/grfinfo/grfinfo.1 deleted file mode 100644 index a17cdc755dd..00000000000 --- a/usr.sbin/grfinfo/grfinfo.1 +++ /dev/null @@ -1,73 +0,0 @@ -.\" $OpenBSD: grfinfo.1,v 1.6 2002/09/06 22:08:36 miod Exp $ -.\" $NetBSD: grfinfo.1,v 1.1 1997/01/31 23:06:53 carrel Exp $ -.\" -.\" Copyright (c) 1997 The NetBSD Foundation, Inc. -.\" All rights reserved. -.\" -.\" This code is derived from software contributed to The NetBSD Foundation -.\" by Dave Carrel -.\" -.\" 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. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 31, 1997 -.Dt GRFINFO 1 -.Os -.Sh NAME -.Nm grfinfo -.Nd display information about grf graphics devices -.Sh SYNOPSIS -.Nm grfinfo -.Op Fl a -.Op Fl t -.Ar device ... -.Sh DESCRIPTION -.Nm -displays information about the graphics framebuffer -.Ar device -list. -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl a -For each -.Ar device , -display the type and all possible information. -.It Fl t -For each -.Ar device , -display the type. -.El -.Pp -If no options are given, the type will be printed (that is, -.Nm -will behave as if -.Fl t -had been passed). -.Sh SEE ALSO -.Xr grf 4 diff --git a/usr.sbin/grfinfo/grfinfo.c b/usr.sbin/grfinfo/grfinfo.c deleted file mode 100644 index 80632a204db..00000000000 --- a/usr.sbin/grfinfo/grfinfo.c +++ /dev/null @@ -1,162 +0,0 @@ -/* $OpenBSD: grfinfo.c,v 1.6 2002/09/06 22:12:18 deraadt Exp $ */ - -/* - * Copyright (c) 1987-1993, The University of Utah and - * the Center for Software Science at the University of Utah (CSS). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the Center - * for Software Science at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSS requests users of this software to return to css-dist@cs.utah.edu any - * improvements that they make and grant CSS redistribution rights. - * - * from: Utah $Hdr: grfinfo.c 1.3 94/04/04$ - */ - -#include <errno.h> -#include <stdio.h> -#include <unistd.h> -#include <util.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <dev/grfioctl.h> - -int getinfo(char *); -void printall(void); -char *tname(void); -void usage(void); - -struct grfinfo gi; - -struct grf_info { - int grf_id; - char *grf_name; -} info[] = { - GRFGATOR, "gatorbox", - GRFBOBCAT, "topcat", - GRFRBOX, "renaissance", - GRFFIREEYE, "fireeye", - GRFHYPERION, "hyperion", - GRFDAVINCI, "davinci", - -1, "unknown", -}; - -int -main(int argc, char *argv[]) -{ - int aflg, tflg; - int c; - char *dname; - - aflg = tflg = 0; - while ((c = getopt(argc, argv, "at")) != -1) { - switch (c) { - case 'a': - if (tflg != 0) - usage(); - aflg++; - break; - case 't': - if (aflg != 0) - usage(); - tflg++; - break; - case '?': - default: - usage(); - } - } - argc -= optind; - argv += optind; - - if (argc == 0) - usage(); - while (argc-- != 0) { - dname = *argv++; - if (getinfo(dname)) { - printf("%s: ", dname); - if (aflg) - printall(); - else - printf("%s\n", tname()); - } - } - exit(0); -} - -int -getinfo(char *dname) -{ - int f; - - f = opendev(dname, 0, OPENDEV_BLCK, NULL); - if (f < 0) { - warn("open(%s)", dname); - return 0; - } - if (ioctl(f, GRFIOCGINFO, &gi) < 0) { - warn("ioctl(%s)", dname); - close(f); - return 0; - } - - close(f); - return 1; -} - -void -printall(void) -{ - printf("%d x %d, ", gi.gd_dwidth, gi.gd_dheight); - if (gi.gd_colors < 3) - printf("monochrome, "); - else { - printf("%d colors, ", gi.gd_colors); - if (gi.gd_planes) - printf("%d planes, ", gi.gd_planes); - } - printf("%s\n", tname()); - printf("registers: 0x%x bytes at 0x%x\n", - gi.gd_regsize, gi.gd_regaddr); - printf("framebuf: 0x%x bytes at 0x%x (%d x %d)\n", - gi.gd_fbsize, gi.gd_fbaddr, gi.gd_fbwidth, gi.gd_fbheight); -} - -char * -tname(void) -{ - struct grf_info *gp; - - for (gp = info; gp->grf_id >= 0; gp++) - if (gi.gd_id == gp->grf_id) - break; - /* - * Heuristics to differentiate catseye from topcat: - * low-res color catseye has 1k x 1k framebuffer and 64 colors - * hi-res mono and color catseye have 1280 wide display - */ - if (gi.gd_id == GRFBOBCAT && - (gi.gd_dwidth == 1280 || - gi.gd_fbsize == 0x100000 && gi.gd_colors == 64)) - return("catseye"); - return(gp->grf_name); -} - -void -usage(void) -{ - extern char *__progname; - - fprintf(stderr, "usage: %s [-at] device\n", __progname); - exit(1); -} diff --git a/usr.sbin/hilinfo/Makefile b/usr.sbin/hilinfo/Makefile deleted file mode 100644 index 756730ca089..00000000000 --- a/usr.sbin/hilinfo/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $OpenBSD: Makefile,v 1.5 2002/02/19 20:20:39 miod Exp $ - -.if ${MACHINE}=="hp300" -PROG= hilinfo -CFLAGS+= -I${.CURDIR}/../../sys/arch/hp300 -DPADD= ${LIBUTIL} -LDADD= -lutil -.else -NOPROG=yes -.endif - -MAN=hilinfo.8 -MANSUBDIR=hp300 - -.include <bsd.prog.mk> diff --git a/usr.sbin/hilinfo/hilinfo.8 b/usr.sbin/hilinfo/hilinfo.8 deleted file mode 100644 index 9bc30b67b86..00000000000 --- a/usr.sbin/hilinfo/hilinfo.8 +++ /dev/null @@ -1,67 +0,0 @@ -.\" $OpenBSD: hilinfo.8,v 1.3 2003/06/12 12:59:50 jmc Exp $ -.\" -.\" Copyright (c) 2002 Miodrag Vallat. -.\" 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. Redistribution 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 ``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 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 February 19, 2002 -.Dt HILINFO 1 hp300 -.Os -.Sh NAME -.Nm hilinfo -.Nd provides information on HIL devices -.Sh SYNOPSIS -.Nm hilinfo -.Op Fl a -.Op Fl t -.Ar device ... -.Sh DESCRIPTION -.Nm -prints information about the -.Ar device -list. -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl a -For each -.Ar device , -display the type and the complete hil information bitstring. -.It Fl t -For each -.Ar device , -display the type. -.El -.Pp -If no options are given, the type will be printed (that is, -.Nm -will behave as if -.Fl t -had been passed). -.Sh SEE ALSO -.Xr hil 4 -.Sh HISTORY -A -.Nm -command appeared in -.Bx 4.4 . diff --git a/usr.sbin/hilinfo/hilinfo.c b/usr.sbin/hilinfo/hilinfo.c deleted file mode 100644 index 2b064564f5c..00000000000 --- a/usr.sbin/hilinfo/hilinfo.c +++ /dev/null @@ -1,153 +0,0 @@ -/* $OpenBSD: hilinfo.c,v 1.6 2004/08/01 18:32:18 deraadt Exp $ */ -/* - * Copyright (c) 1987-1993, The University of Utah and - * the Center for Software Science at the University of Utah (CSS). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the Center - * for Software Science at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSS requests users of this software to return to css-dist@cs.utah.edu any - * improvements that they make and grant CSS redistribution rights. - * - * from: Utah $Hdr: hilinfo.c 1.3 94/04/04$ - */ - -#include <errno.h> -#include <stdio.h> -#include <unistd.h> -#include <util.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <dev/hilioctl.h> - -int getinfo(char *); -void printall(void); -char *tname(void); -void usage(void); - -struct _hilbuf11 hi; -struct _hilbuf16 sc; - -struct hil_info { - u_char hil_lo; - u_char hil_hi; - char *hil_name; -} info[] = { - 0xA0, 0xFF, "keyboard", - 0x60, 0x6B, "mouse", - 0x90, 0x97, "tablet", - 0x34, 0x34, "id-module", - 0x30, 0x30, "button-box", - 0x00, 0x00, "unknown", -}; - -int -main(int argc, char *argv[]) -{ - int aflg, tflg; - int c; - char *dname; - - aflg = tflg = 0; - while ((c = getopt(argc, argv, "at")) != -1) { - switch (c) { - case 'a': - if (tflg != 0) - usage(); - aflg++; - break; - case 't': - if (aflg != 0) - usage(); - tflg++; - break; - case '?': - default: - usage(); - } - } - argc -= optind; - argv += optind; - - if (argc == 0) - usage(); - while (argc-- != 0) { - dname = *argv++; - if (getinfo(dname)) { - printf("%s: ", dname); - if (aflg) - printall(); - else - printf("%s\n", tname()); - } - } - exit(0); -} - -int -getinfo(char *dname) -{ - int f; - - f = opendev(dname, 0, OPENDEV_BLCK, NULL); - if (f < 0) { - warn("open(%s)", dname); - return 0; - } - if (ioctl(f, HILIOCID, &hi) < 0 || ioctl(f, HILIOCSC, &sc) < 0) { - warn("ioctl(%s)", dname); - close(f); - return 0; - } - - close(f); - return 1; -} - -void -printall(void) -{ - int i; - - printf("%s, info: ", tname()); - for (i = 0; i < 11; i++) - printf("%2.2x", hi.string[i]); - if (strcmp(tname(), "id-module") == 0) { - printf(", sc: "); - for (i = 0; i < 16; i++) - printf("%2.2x", sc.string[i]); - } - printf("\n"); -} - -char * -tname(void) -{ - struct hil_info *hp; - - for (hp = info; hp->hil_lo; hp++) - if (hi.string[0] >= hp->hil_lo && hi.string[0] <= hp->hil_hi) - break; - if (hi.string[0] == 0x61 && hi.string[1] == 0x13) - return("knobs"); - return(hp->hil_name); -} - -void -usage(void) -{ - extern char *__progname; - - fprintf(stderr, "usage: %s [-at] device\n", __progname); - exit(1); -} diff --git a/usr.sbin/wsconscfg/Makefile b/usr.sbin/wsconscfg/Makefile index ead8e6c33cf..ed6084509b0 100644 --- a/usr.sbin/wsconscfg/Makefile +++ b/usr.sbin/wsconscfg/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.18 2005/01/13 19:21:04 drahn Exp $ +# $OpenBSD: Makefile,v 1.19 2005/01/14 22:39:40 miod Exp $ .if ${MACHINE} == "alpha" || ${MACHINE} == "amd64" || \ - ${MACHINE} == "cats" || ${MACHINE} == "hppa" || \ - ${MACHINE} == "i386" || ${MACHINE} == "luna88k" || \ - ${MACHINE} == "macppc" || ${MACHINE} == "sparc" || \ - ${MACHINE} == "sparc64" || ${MACHINE} == "sgi" || \ - ${MACHINE} == "zaurus" + ${MACHINE} == "cats" || ${MACHINE} == "hp300" || \ + ${MACHINE} == "hppa" || ${MACHINE} == "i386" || \ + ${MACHINE} == "luna88k" || ${MACHINE} == "macppc" || \ + ${MACHINE} == "sgi" || ${MACHINE} == "sparc" || \ + ${MACHINE} == "sparc64" || ${MACHINE} == "zaurus" PROG= wsconscfg SRCS= wsconscfg.c @@ -17,7 +17,7 @@ NOPROG=yes .endif MAN= wsconscfg.8 -MANSUBDIR= alpha amd64 cats hppa i386 luna88k macppc sparc sparc64 sgi -MANSUBDIR+= zaurus +MANSUBDIR= alpha amd64 cats hp300 hppa i386 luna88k macppc sgi +MANSUBDIR+= sparc sparc64 zaurus .include <bsd.prog.mk> |