Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Obsolete pow(4) and rtcalarm(8). Discussed in port-x68k@.



details:   https://anonhg.NetBSD.org/src/rev/3bd574ac398f
branches:  trunk
changeset: 771310:3bd574ac398f
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Nov 19 12:27:42 2011 +0000

description:
Obsolete pow(4) and rtcalarm(8).  Discussed in port-x68k@.
Probably the combination of pow(4) ioctl and rtcalarm(8) does
not work for a long time, and nobody uses them.
I'll rewrite a part about power switch handler as a new device.

diffstat:

 distrib/sets/lists/base/md.x68k           |    5 +-
 distrib/sets/lists/comp/md.x68k           |    4 +-
 distrib/sets/lists/man/mi                 |   14 +-
 share/man/man4/man4.x68k/Makefile         |    4 +-
 share/man/man4/man4.x68k/pow.4            |  172 ---------------
 share/man/man8/man8.x68k/Makefile         |    4 +-
 share/man/man8/man8.x68k/rtcalarm.8       |   76 ------
 sys/arch/x68k/conf/GENERIC                |    5 +-
 sys/arch/x68k/conf/INSTALL                |    5 +-
 sys/arch/x68k/conf/files.x68k             |    6 +-
 sys/arch/x68k/conf/majors.x68k            |    4 +-
 sys/arch/x68k/dev/pow.c                   |  337 ------------------------------
 sys/arch/x68k/dev/powvar.h                |   44 ---
 sys/arch/x68k/include/Makefile            |    4 +-
 sys/arch/x68k/include/powioctl.h          |   66 -----
 sys/arch/x68k/usr.bin/Makefile            |    4 +-
 sys/arch/x68k/usr.bin/rtcalarm/Makefile   |    6 -
 sys/arch/x68k/usr.bin/rtcalarm/rtcalarm.c |  287 -------------------------
 18 files changed, 27 insertions(+), 1020 deletions(-)

diffs (truncated from 1257 to 300 lines):

diff -r 85368b2d9afe -r 3bd574ac398f distrib/sets/lists/base/md.x68k
--- a/distrib/sets/lists/base/md.x68k   Sat Nov 19 02:39:14 2011 +0000
+++ b/distrib/sets/lists/base/md.x68k   Sat Nov 19 12:27:42 2011 +0000
@@ -1,10 +1,11 @@
-# $NetBSD: md.x68k,v 1.42 2008/12/20 13:20:58 isaki Exp $
+# $NetBSD: md.x68k,v 1.43 2011/11/19 12:27:42 isaki Exp $
+./dev/pow0                                     base-obsolete           obsolete
 ./dev/pow1                                     base-obsolete           obsolete
 ./usr/bin/bellctrl                             base-util-bin
 ./usr/bin/loadfont                             base-util-bin
 ./usr/bin/loadkmap                             base-util-bin
 ./usr/bin/palette                              base-util-bin
-./usr/bin/rtcalarm                             base-util-bin
+./usr/bin/rtcalarm                             base-obsolete           obsolete
 ./usr/bin/tvctrl                               base-util-bin
 ./usr/mdec/boot                                        base-sysutil-bin
 ./usr/mdec/fdboot_ufs                          base-sysutil-bin
diff -r 85368b2d9afe -r 3bd574ac398f distrib/sets/lists/comp/md.x68k
--- a/distrib/sets/lists/comp/md.x68k   Sat Nov 19 02:39:14 2011 +0000
+++ b/distrib/sets/lists/comp/md.x68k   Sat Nov 19 12:27:42 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.x68k,v 1.58 2011/07/17 20:54:32 joerg Exp $
+# $NetBSD: md.x68k,v 1.59 2011/11/19 12:27:42 isaki Exp $
 ./usr/include/ieeefp.h                         comp-c-include
 ./usr/include/x68k                             comp-c-include
 ./usr/include/x68k/_G_config.h                 comp-obsolete           obsolete
@@ -46,7 +46,7 @@
 ./usr/include/x68k/pci_machdep.h               comp-obsolete           obsolete
 ./usr/include/x68k/pmap.h                      comp-c-include
 ./usr/include/x68k/pmc.h                       comp-c-include
-./usr/include/x68k/powioctl.h                  comp-c-include
+./usr/include/x68k/powioctl.h                  comp-obsolete           obsolete
 ./usr/include/x68k/proc.h                      comp-c-include
 ./usr/include/x68k/profile.h                   comp-c-include
 ./usr/include/x68k/psl.h                       comp-c-include
diff -r 85368b2d9afe -r 3bd574ac398f distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sat Nov 19 02:39:14 2011 +0000
+++ b/distrib/sets/lists/man/mi Sat Nov 19 12:27:42 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1355 2011/11/15 16:50:45 riz Exp $
+# $NetBSD: mi,v 1.1356 2011/11/19 12:27:42 isaki Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1823,7 +1823,7 @@
 ./usr/share/man/cat4/x68k/intro.0              man-sys-catman          .cat
 ./usr/share/man/cat4/x68k/mfp.0                        man-sys-catman          .cat
 ./usr/share/man/cat4/x68k/neptune.0            man-sys-catman          .cat
-./usr/share/man/cat4/x68k/pow.0                        man-sys-catman          .cat
+./usr/share/man/cat4/x68k/pow.0                        man-obsolete            obsolete
 ./usr/share/man/cat4/x68k/vs.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/x86/amdpcib.0             man-sys-catman          .cat
 ./usr/share/man/cat4/x86/apic.0                        man-sys-catman          .cat
@@ -2942,7 +2942,7 @@
 ./usr/share/man/cat8/x68k/memswitch.0          man-sysutil-catman      .cat
 ./usr/share/man/cat8/x68k/newdisk.0            man-sysutil-catman      .cat
 ./usr/share/man/cat8/x68k/poffd.0              man-obsolete            obsolete
-./usr/share/man/cat8/x68k/rtcalarm.0           man-sysutil-catman      .cat
+./usr/share/man/cat8/x68k/rtcalarm.0           man-obsolete            obsolete
 ./usr/share/man/cat8/x86_64/MAKEDEV.0          man-obsolete            obsolete
 ./usr/share/man/cat8/x86_64/makedev.0          man-obsolete            obsolete
 ./usr/share/man/cat8/xntpd.0                   man-obsolete            obsolete
@@ -4586,7 +4586,7 @@
 ./usr/share/man/html4/x68k/intro.html          man-sys-htmlman         html
 ./usr/share/man/html4/x68k/mfp.html            man-sys-htmlman         html
 ./usr/share/man/html4/x68k/neptune.html                man-sys-htmlman         html
-./usr/share/man/html4/x68k/pow.html            man-sys-htmlman         html
+./usr/share/man/html4/x68k/pow.html            man-obsolete            obsolete
 ./usr/share/man/html4/x68k/vs.html             man-sys-htmlman         html
 ./usr/share/man/html4/x86/amdpcib.html         man-sys-htmlman         html
 ./usr/share/man/html4/x86/apic.html            man-sys-htmlman         html
@@ -5483,7 +5483,7 @@
 ./usr/share/man/html8/x68k/memswitch.html      man-sysutil-htmlman     html
 ./usr/share/man/html8/x68k/newdisk.html                man-sysutil-htmlman     html
 ./usr/share/man/html8/x68k/poffd.html          man-obsolete            obsolete
-./usr/share/man/html8/x68k/rtcalarm.html       man-sysutil-htmlman     html
+./usr/share/man/html8/x68k/rtcalarm.html       man-obsolete            obsolete
 ./usr/share/man/html8/yp.html                  man-nis-htmlman         html
 ./usr/share/man/html8/ypbind.html              man-nis-htmlman         yp,html
 ./usr/share/man/html8/ypinit.html              man-nis-htmlman         yp,html
@@ -7284,7 +7284,7 @@
 ./usr/share/man/man4/x68k/intro.4              man-sys-man             .man
 ./usr/share/man/man4/x68k/mfp.4                        man-sys-man             .man
 ./usr/share/man/man4/x68k/neptune.4            man-sys-man             .man
-./usr/share/man/man4/x68k/pow.4                        man-sys-man             .man
+./usr/share/man/man4/x68k/pow.4                        man-obsolete            obsolete
 ./usr/share/man/man4/x68k/vs.4                 man-sys-man             .man
 ./usr/share/man/man4/x86/amdpcib.4             man-sys-man             .man
 ./usr/share/man/man4/x86/apic.4                        man-sys-man             .man
@@ -8403,7 +8403,7 @@
 ./usr/share/man/man8/x68k/memswitch.8          man-sysutil-man         .man
 ./usr/share/man/man8/x68k/newdisk.8            man-sysutil-man         .man
 ./usr/share/man/man8/x68k/poffd.8              man-obsolete            obsolete
-./usr/share/man/man8/x68k/rtcalarm.8           man-sysutil-man         .man
+./usr/share/man/man8/x68k/rtcalarm.8           man-obsolete            obsolete
 ./usr/share/man/man8/x86_64/MAKEDEV.8          man-obsolete            obsolete
 ./usr/share/man/man8/x86_64/makedev.8          man-obsolete            obsolete
 ./usr/share/man/man8/xntpd.8                   man-obsolete            obsolete
diff -r 85368b2d9afe -r 3bd574ac398f share/man/man4/man4.x68k/Makefile
--- a/share/man/man4/man4.x68k/Makefile Sat Nov 19 02:39:14 2011 +0000
+++ b/share/man/man4/man4.x68k/Makefile Sat Nov 19 12:27:42 2011 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.7 2002/12/01 09:14:34 isaki Exp $
+#      $NetBSD: Makefile,v 1.8 2011/11/19 12:27:43 isaki Exp $
 
-MAN=   bmd.4 intio.4 intro.4 mfp.4 neptune.4 pow.4 vs.4
+MAN=   bmd.4 intio.4 intro.4 mfp.4 neptune.4 vs.4
 MANSUBDIR=/x68k
 
 .include <bsd.man.mk>
diff -r 85368b2d9afe -r 3bd574ac398f share/man/man4/man4.x68k/pow.4
--- a/share/man/man4/man4.x68k/pow.4    Sat Nov 19 02:39:14 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-.\"    $NetBSD: pow.4,v 1.14 2009/03/09 19:24:31 joerg Exp $
-.\"
-.\" Copyright (c) 1995 MINOURA Makoto.
-.\" 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.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by Minoura Makoto.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission
-.\"
-.\" 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 December 20, 2008
-.Dt POW 4 x68k
-.Os
-.Sh NAME
-.Nm pow
-.Nd X68k power switch device
-.Sh DESCRIPTION
-File
-.Pa /dev/pow0
-is a device used to access the x68k power switch / bootstrap information and
-the RTC alarm timer.
-The following operations are allowed using the
-.Xr ioctl 2
-system call:
-.Pp
-.Bl -tag -width POWIOCGPOWERINFO -compact -offset indent
-.It POWIOGPOWERINFO
-Get power switch status
-.It POWIOGALARMINFO
-Get RTC alarm timer status
-.It POWIOSALARMINFO
-Set RTC alarm timer
-.El
-.Pp
-Any power switch events are reported to
-.Xr powerd 8 .
-.Sh GETTING POWER SWITCH STATUS
-.Bd -literal -offset indent
-#include \*[Lt]sys/ioctl.h\*[Gt]
-#include \*[Lt]machine/powioctl.h\*[Gt]
-
-ioctl (fd, POWIOCGPOWERINFO, \*[Am]powerinfo);
-struct x68k_powerinfo powerinfo;
-.Ed
-.Pp
-Returns the power switch status etc. in the following structure.
-.Bd -literal -offset indent
-struct x68k_powerinfo {
-       int pow_switch_boottime;
-       int pow_switch_current;
-       time_t pow_boottime;
-       unsigned int pow_bootcount;
-       time_t pow_usedtotal;
-};
-.Ed
-.Pp
-The members of the structure mean:
-.Bl -hang
-.It pow_switch_boottime :
-The power switch status at the system start time.
-The status can be checked by testing for the following definitions
-with the logical
-.Dq and
-(\*[Am]):
-.Pp
-.Bl -tag -compact -width POW_EXTERNALSW
-.It POW_ALARMSW
-True if the system started by the RTC alarm timer
-.It POW_EXTERNALSW
-True if the EXPWON signal of the I/O slot is on
-.It POW_FRONTSW
-True if the front power switch is on
-.El
-.Pp
-EXPWON-related information is not tested.
-.It pow_switch_current :
-Current power switch status.
-See above.
-.It pow_boottime :
-The time when
-.Nx
-started.
-.It pow_bootcount , pow_usedtotal :
-Host's boot information from the system memory switch.
-Total usage in count (pow_bootcount) and second (pow_usedtotal).
-.El
-.Sh ACCESSING RTC ALARM TIMER
-.Ss Getting the alarm timer
-.Bd -literal -offset indent
-#include \*[Lt]sys/ioctl.h\*[Gt]
-#include \*[Lt]machine/powioctl.h\*[Gt]
-
-ioctl (fd, POWIOCGALARMINFO, \*[Am]alarminfo);
-struct x68k_alarminfo alarminfo;
-.Ed
-.Pp
-Returns x68k's alarm timer information in the following structure.
-.Bd -literal -offset indent
-struct x68k_alarminfo {
-       int al_enable;
-       unsigned int al_ontime;
-       int al_dowhat;
-       time_t al_offtime;
-};
-.Ed
-.Pp
-The members mean:
-.Bl -hang
-.It al_enable :
-True if the alarm timer is enable.
-.It al_ontime :
-Internal expression of the alarm timer.
-See
-.Dq C Compiler PRO-68K Programmers' Manual
-Chapter 3 Section ALARMSET.
-.It al_dowhat :
-What to do when started by the alarm timer.
-See
-.Dq Programmers' manual .
-.It al_offtime :
-Display the time in seconds since the alarm is activated until
-the power is turned off (though the resolution is resolved to minutes).
-Be cautious when using IOCS and the like as these require minute
-time units.
-0 indicates an infinity.
-.El
-.Ss Setting the alarm timer
-.Bd -literal -offset indent
-ioctl (fd, POWIOCSALARMINFO, \*[Am]alarminfo);
-struct x68k_alarminfo alarminfo;
-.Ed
-.Pp
-Sets the alarm timer according to the argument
-.Ar alarminfo
-(see above).
-.Sh SEE ALSO
-.Xr ioctl 2 ,
-.Xr powerd 8 ,
-.Xr rtcalarm 8
-.Rs
-.%T C Compiler PRO-68K Programmers' Manual', Chapter 3 IOCS Calls, Section ALARMSET
-.%I Sharp
-.Re
-.Sh AUTHORS
-.An Minoura Makoto Aq minoura%flab.fujitsu.co.jp@localhost
-.Ss SPECIAL THANKS
-Liam Hahne Minn
-.Aq hahne%sail.t.u-tokyo.ac.jp@localhost
-.Sh BUGS
-The file
-.Pa /dev/pow0
-can only be opened by one process at a time.
diff -r 85368b2d9afe -r 3bd574ac398f share/man/man8/man8.x68k/Makefile
--- a/share/man/man8/man8.x68k/Makefile Sat Nov 19 02:39:14 2011 +0000
+++ b/share/man/man8/man8.x68k/Makefile Sat Nov 19 12:27:42 2011 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.9 2008/12/20 13:20:58 isaki Exp $
+#      $NetBSD: Makefile,v 1.10 2011/11/19 12:27:43 isaki Exp $
 
-MAN=   boot.8 loadbsd.8 newdisk.8 rtcalarm.8
+MAN=   boot.8 loadbsd.8 newdisk.8
 MLINKS+=loadbsd.8 loadbsd.x.8
 MANSUBDIR=/x68k
 
diff -r 85368b2d9afe -r 3bd574ac398f share/man/man8/man8.x68k/rtcalarm.8
--- a/share/man/man8/man8.x68k/rtcalarm.8       Sat Nov 19 02:39:14 2011 +0000



Home | Main Index | Thread Index | Old Index