rename sgi's power(4) to nmi(4)

2010-04-01 Thread Jasper Lievisse Adriaanse
hi,

the attached diff renames sgi's power(4) driver to nmi(4). that name
makes actually a lot more sense.

i'll commit the manpage bits separately.

ok?

-- 
Stay Hungry. Stay Foolish.


Index: share/man/man4/man4.sgi/Makefile
===
RCS file: /cvs/src/share/man/man4/man4.sgi/Makefile,v
retrieving revision 1.20
diff -p -u -p -u -r1.20 Makefile
--- share/man/man4/man4.sgi/Makefile8 Mar 2010 01:47:00 -   1.20
+++ share/man/man4/man4.sgi/Makefile29 Mar 2010 21:39:39 -
@@ -2,7 +2,7 @@
 
 MAN=   dsrtc.4 gbe.4 iec.4 impact.4 intro.4 ioc.4 iockbc.4 iof.4 \
macebus.4 mavb.4 mec.4 mkbc.4 odyssey.4 \
-   owmac.4 owserial.4 power.4 xbow.4 xbridge.4 xheart.4
+   owmac.4 owserial.4 nmi.4 xbow.4 xbridge.4 xheart.4
 MLINKS=macebus.4 macepcibr.4 \
xbridge.4 xbpci.4
 
Index: share/man/man4/man4.sgi/nmi.4
===
RCS file: share/man/man4/man4.sgi/nmi.4
diff -N share/man/man4/man4.sgi/nmi.4
--- /dev/null   1 Jan 1970 00:00:00 -
+++ share/man/man4/man4.sgi/nmi.4   29 Mar 2010 21:39:39 -
@@ -0,0 +1,57 @@
+.\ $OpenBSD$
+.\
+.\ Copyright (c) 2007,2010 Jasper Lievisse Adriaanse jas...@openbsd.org
+.\ All rights reserved.
+.\
+.\ Permission to use, copy, modify, and distribute this software for any
+.\ purpose with or without fee is hereby granted, provided that the above
+.\ copyright notice and this permission notice appear in all copies.
+.\
+.\ THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\
+.Dd $Mdocdate$
+.Dt NMI 4 sgi
+.Os
+.Sh NAME
+.Nm nmi
+.Nd non-meaningful interrupt
+.Sh SYNOPSIS
+.Cd nmi0 at macebus0 Pq O2
+.Cd nmi0 at mainbus0 Pq Octane
+.Sh DESCRIPTION
+The SGI O2 and Octane machines are equiped with a button that generates
+a non-meaningfull interrupt (NMI) when pressed.
+The
+.Nm
+driver catches that interrupt.
+If the
+.Va machdep.kbdreset
+.Xr sysctl 8
+is set to 1,
+.Nm
+will then signal
+.Xr init 8
+to do a clean
+.Xr shutdown 8 .
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr macebus 4 ,
+.Xr init 8 ,
+.Xr rc.shutdown 8 ,
+.Xr sysctl 8
+.Sh HISTORY
+Support for the
+.Nm
+driver first appeared in
+.Ox 4.8 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Jasper Lievisse Adriaanse Aq jas...@openbsd.org .
Index: share/man/man4/man4.sgi/power.4
===
RCS file: share/man/man4/man4.sgi/power.4
diff -N share/man/man4/man4.sgi/power.4
--- share/man/man4/man4.sgi/power.4 26 Oct 2009 18:38:09 -  1.3
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,57 +0,0 @@
-.\ $OpenBSD: power.4,v 1.3 2009/10/26 18:38:09 miod Exp $
-.\
-.\ Copyright (c) 2007 Jasper Lievisse Adriaanse jas...@openbsd.org
-.\ All rights reserved.
-.\
-.\ Permission to use, copy, modify, and distribute this software for any
-.\ purpose with or without fee is hereby granted, provided that the above
-.\ copyright notice and this permission notice appear in all copies.
-.\
-.\ THE SOFTWARE IS PROVIDED AS IS AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\
-.Dd $Mdocdate: October 26 2009 $
-.Dt POWER 4 sgi
-.Os
-.Sh NAME
-.Nm power
-.Nd power button
-.Sh SYNOPSIS
-.Cd power0 at macebus0 Pq O2
-.Cd power0 at mainbus0 Pq Octane
-.Sh DESCRIPTION
-The SGI O2 and Octane machines generate an interrupt when the power button
-on the front panel is pressed.
-The
-.Nm
-driver catches that interrupt.
-If the
-.Va machdep.kbdreset
-.Xr sysctl 8
-is set to 1,
-.Nm
-will then signal
-.Xr init 8
-to do a clean
-.Xr shutdown 8 .
-.Sh SEE ALSO
-.Xr intro 4 ,
-.Xr macebus 4 ,
-.Xr init 8 ,
-.Xr rc.shutdown 8 ,
-.Xr sysctl 8
-.Sh HISTORY
-Support for the
-.Nm
-driver first appeared in
-.Ox 4.3 .
-.Sh AUTHORS
-The
-.Nm
-driver was written by
-.An Jasper Lievisse Adriaanse Aq jas...@openbsd.org .
Index: sys/arch/sgi/conf/GENERIC-IP30
===
RCS file: /cvs/src/sys/arch/sgi/conf/GENERIC-IP30,v
retrieving revision 1.28
diff -p -u -p -u -r1.28 GENERIC-IP30
--- sys/arch/sgi/conf/GENERIC-IP30  

Re: rename sgi's power(4) to nmi(4)

2010-04-01 Thread Mark Kettenis
 Date: Thu, 1 Apr 2010 09:32:03 +0200
 From: Jasper Lievisse Adriaanse jas...@humppa.nl
 
 hi,
 
 the attached diff renames sgi's power(4) driver to nmi(4). that name
 makes actually a lot more sense.

Please explain!  The interrupt handler registered by this driver does
a psignal(initproc, SIGUSR2), which powers down the machine.  Drivers
that do this are called power(4) on other hardware platforms as well.