Page MenuHomeFreeBSD

efiwake(8): add man page
ClosedPublic

Authored by jo_bruelltuete.com on May 4 2023, 3:49 PM.
Tags
None
Referenced Files
F86295844: D39961.id121522.diff
Tue, Jun 18, 8:08 AM
F86288759: D39961.id121522.diff
Tue, Jun 18, 5:03 AM
F86288590: D39961.id121539.diff
Tue, Jun 18, 4:59 AM
Unknown Object (File)
May 11 2024, 11:59 PM
Unknown Object (File)
May 1 2024, 9:36 AM
Unknown Object (File)
Apr 27 2024, 3:25 PM
Unknown Object (File)
Apr 26 2024, 3:17 AM
Unknown Object (File)
Apr 16 2024, 4:45 PM

Details

Summary

add man page

Test Plan

Renders as:

EFIWAKE(8)              FreeBSD System Manager's Manual             EFIWAKE(8)

NAME
     efiwake – manipulate the EFI wake timer

SYNOPSIS
     efiwake
     efiwake -d
     efiwake -e yyyy-mm-ddThh:mm:ss

DESCRIPTION
     efiwake reports the current value of, disables or enables the EFI wake
     timer that can wake your machine from S3 sleep at a given time.

     If invoked without arguments, the current EFI time and the current value
     of the wake timer will be printed, followed by an enabled status and a
     pending status.  EFI time is supposed to be in UTC.  Note that it can be
     out of sync with kernel time.  The pending status tells whether the wake
     timer fired recently; it is cleared upon reading.

     If invoked with the -d option, the wake timer is reset and disabled.

     If invoked with the -e option, the wake timer is set to the given time
     and date.  If the date or time is invalid, an error is returned.

     The current EFI time is always printed.

EXAMPLES
     Without arguments:

           # efiwake
           Current EFI time: 2023-05-04T15:30:45
           EFI wake time: 2023-05-04T10:00:00; enabled=0, pending=1

     Disabling and resetting the wake timer:

           # efiwake -d
           Current EFI time: 2023-05-04T15:32:16
           EFI wake time: 2023-05-04T15:32:16; enabled=0, pending=0

     Enabling the wake timer with a valid date:

           # efiwake -e 2023-05-04T15:35:00
           Current EFI time: 2023-05-04T15:34:05
           EFI wake time: 2023-05-04T15:35:00; enabled=1, pending=0

     Trying to enable with an invalid date (there is no 31st of April):

           # efiwake -e 2023-04-31T15:35:00
           Current EFI time: 2023-05-04T15:35:25
           efiwake: cannot enable EFI wake time: Invalid argument

AUTHORS
     The tool and manual page were written by Johannes Totz
     <jo@bruelltuete.com>.

BUGS
     The quality of EFI implementations differs widely.  Corruption of the
     wake-up date has been observed on real hardware.

FreeBSD 13.2-STABLE               May 9, 2023              FreeBSD 13.2-STABLE

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jo_bruelltuete.com edited the test plan for this revision. (Show Details)
jo_bruelltuete.com added a subscriber: kib.

cc @kib

Did you run mandoc -T lint on the man page?

usr.sbin/efiwake/efiwake.8
38

This should be like
.Op Fl d
.Op Fl e Ar ...

49

New sentence should start with a new line.

50

No need to scream, please end the sentence with dot.

66

Use

.Bd -literal
# efiwake
Current time ...
.Ed

for literal displays.

christos added inline comments.
usr.sbin/efiwake/efiwake.8
59

New sentence, new line.

87

.Pp is not needed here.

93

New sentence, new line.

thanks for looking at this patch

usr.sbin/efiwake/efiwake.8
38

The current .Op Fl d | e Ar yyyy-mm-ddThh:mm:ss renders as efiwake [-d | -e yyyy-mm-ddThh:mm:ss] which means either of these options could be present but not both.

Having separate Fl d and Fl e will render as efiwake [-d] [-e yyyy-mm-ddThh:mm:ss] which means both could be specified at the same time.

usr.sbin/efiwake/efiwake.8
67

Use .Bd -literal -offset indent instead. Same for the other occurrences of .Bd.

You also need to add:

MAN=	efiwake.8

to usr.sbin/efiwake/Makefile, otherwise the man page won't be installed.

Rename the title to efiwake(8): add man page

You also need to add:

MAN=	efiwake.8

to usr.sbin/efiwake/Makefile, otherwise the man page won't be installed.

ah looks like that got lost in one of the updates... git-sausage-fingers.

jo_bruelltuete.com retitled this revision from Add man page for efiwake to efiwake(8): add man page.May 4 2023, 7:18 PM

making sure to pick up the makefile as well

This revision is now accepted and ready to land.May 4 2023, 7:21 PM
grahamperrin added a subscriber: grahamperrin.
grahamperrin added inline comments.
usr.sbin/efiwake/efiwake.8
42
44
52–53
57
61
62
64

If something is explicitly always, then in any case is superfluous.

99
This revision now requires changes to proceed.May 4 2023, 8:07 PM
usr.sbin/efiwake/efiwake.8
96

It'd be good to add your email as well.

usr.sbin/efiwake/efiwake.8
38

Then it perhaps should be

.Nm
.Op Fl d
.Nm
.Op Fl e Ar ...

The point is that d/e are different uses, instead of being options for the single use.

jo_bruelltuete.com edited the test plan for this revision. (Show Details)

I don't yet have a build of the OS that includes efiwake, but the parts of the (non-rendered) manual page that I can read look OK to me. Thanks.

This revision is now accepted and ready to land.May 8 2023, 3:12 PM

Please fix the issue I pointed out and mail me the patch with all metadata and tag lines.

usr.sbin/efiwake/efiwake.8
36

Should there be a synopsis line for querying the current settings?

jo_bruelltuete.com edited the test plan for this revision. (Show Details)

synopsis for no options. make the other two non-optional.

This revision now requires review to proceed.May 9 2023, 1:37 PM
jo_bruelltuete.com added inline comments.
usr.sbin/efiwake/efiwake.8
36

looks weird if the args are optional, so i made them non-optional.

This revision was not accepted when it landed; it landed in state Needs Review.May 9 2023, 2:33 PM
Closed by commit rGde9bed030f47: efiwake(8): add man page (authored by jo_bruelltuete.com, committed by kib). · Explain Why
This revision was automatically updated to reflect the committed changes.