summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2012-03-30 06:40:36 +0000
committerjmc <jmc@openbsd.org>2012-03-30 06:40:36 +0000
commit5e2f88c93b3c8f0cf79b32be262e7a43b007c9ca (patch)
tree54b9da7809703179feaa0485d7ce1b72a32a48ac
parentAdd PermitOpen none option based on patch from Loganaden Velvindron (diff)
downloadwireguard-openbsd-5e2f88c93b3c8f0cf79b32be262e7a43b007c9ca.tar.xz
wireguard-openbsd-5e2f88c93b3c8f0cf79b32be262e7a43b007c9ca.zip
document ZZZ; ok deraadt
-rw-r--r--usr.sbin/apm/apm.837
-rw-r--r--usr.sbin/apm/apm.c8
2 files changed, 27 insertions, 18 deletions
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index 976323955c1..1593b96c9b9 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: apm.8,v 1.36 2012/03/26 20:17:43 deraadt Exp $
+.\" $OpenBSD: apm.8,v 1.37 2012/03/30 06:40:36 jmc Exp $
.\"
.\" Copyright (c) 1996 John T. Kohl
.\" All rights reserved.
@@ -26,19 +26,23 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: March 26 2012 $
+.Dd $Mdocdate: March 30 2012 $
.Dt APM 8
.Os
.Sh NAME
-.Nm apm
+.Nm apm ,
+.Nm zzz ,
+.Nm ZZZ
.Nd Advanced Power Management control program
.Sh SYNOPSIS
+.Nm apm
+.Op Fl AabCHLlmPSvZz
+.Op Fl f Ar sockname
.Nm zzz
-.Nm ZZZ
-.Op Fl Sz
+.Op Fl SZz
.Op Fl f Ar sockname
-.Nm apm
-.Op Fl AabCHLlmPSvz
+.Nm ZZZ
+.Op Fl SZz
.Op Fl f Ar sockname
.Sh DESCRIPTION
.Nm
@@ -118,21 +122,26 @@ Display the performance adjustment mode.
Put the system into stand-by (light sleep) state.
.It Fl v
Request more verbose description of the displayed states.
+.It Fl Z
+Put the system into hibernation.
+System memory is saved to disk (swap space)
+and the machine is powered down.
.It Fl z
Put the system into suspend (deep sleep) state.
.El
.Pp
The
.Nm zzz
-variant of this command is an alternative for suspending the system.
+and
+.Nm ZZZ
+commands are shortcuts for suspending and hibernating the system,
+respectively.
With no arguments,
-.Nm zzz
-places the system into suspend state.
-The command line flags serve the same purpose as for the
-.Nm
-variant of this command.
+they are placed into their respective states.
+The command line flags serve the same purpose as for
+.Nm .
.Pp
-This command does not wait for positive confirmation that the requested
+These commands do not wait for positive confirmation that the requested
state has been entered; to do so would mean the command does not return
until the system resumes from its sleep state.
.Sh FILES
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c
index 585e94cc51a..0dce86c1409 100644
--- a/usr.sbin/apm/apm.c
+++ b/usr.sbin/apm/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.25 2012/03/26 20:17:43 deraadt Exp $ */
+/* $OpenBSD: apm.c,v 1.26 2012/03/30 06:40:36 jmc Exp $ */
/*
* Copyright (c) 1996 John T. Kohl
@@ -59,7 +59,7 @@ int send_command(int fd, struct apm_command *cmd, struct apm_reply *reply);
void
usage(void)
{
- fprintf(stderr,"usage: %s [-AabCHLlmPSvz] [-f sockname]\n",
+ fprintf(stderr,"usage: %s [-AabCHLlmPSvZz] [-f sockname]\n",
__progname);
exit(1);
}
@@ -67,7 +67,7 @@ usage(void)
void
zzusage(void)
{
- fprintf(stderr,"usage: %s [-Sz] [-f sockname]\n",
+ fprintf(stderr,"usage: %s [-SZz] [-f sockname]\n",
__progname);
exit(1);
}
@@ -228,7 +228,7 @@ main(int argc, char *argv[])
action = GETSTATUS;
break;
default:
- if (!strcmp(__progname, "zzz"))
+ if (!strcmp(__progname, "zzz") || !strcmp(__progname, "ZZZ"))
zzusage();
else
usage();