Skip to contentSkip to conversation

man2/: punctuate long numeric strings with digit separators

PATCH In review Brian Inglis 2 participants 10 messages Feb 5, 2023 – Feb 6, 2023 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

cover man2/: punctuate long numeric strings with digit separators

man2/: use C digit separators with \\[aq] to show "'" or ISO/IEC suffixes to clarify long binary, octal, hex, decimal numeric strings; use consistent interval notation for value ranges;
fix minor discrepancies.

Brian Inglis (11):
man2/shmget.2: fix limit units suffix from SI to IEC man2/spu_run.2: fix example comment status code or-ed value man2/: use consistent interval notation for value ranges man2/open.2: punctuate octal perms with digit separators man2/reboot.2: show BCD dates in hex not decimal man2/reboot.2: punctuate hex in docs with digit separators man2/statfs.2: punctuate hex in docs with digit separators man2/adjtimex.2: use ISO/IEC suffixes and digit separators in ranges
and example docs
man2/getrandom.2: change limit to use IEC suffix man2/futex.2: change limit to use ISO suffix
man2/: punctuate long numeric strings with digit separators

 man2/add_key.2         |   2 +-
 man2/adjtimex.2        |  12 ++---
 man2/clock_getres.2    |   2 +-
 man2/clock_nanosleep.2 |   2 +-
 man2/eventfd.2         |   6 +--
 man2/execve.2          |   2 +-
 man2/fcntl.2           |   4 +-
 man2/futex.2           |   2 +-
 man2/getitimer.2       |   4 +-
 man2/getrandom.2       |   2 +-
 man2/gettimeofday.2    |   2 +-
 man2/ioctl.2           |   4 +-
 man2/ioctl_console.2   |   2 +-
 man2/ioctl_getfsmap.2  |   4 +-
 man2/ioperm.2          |   2 +-
 man2/kexec_load.2      |   2 +-
 man2/link.2            |   4 +-
 man2/msgget.2          |   2 +-
 man2/nanosleep.2       |   4 +-
 man2/open.2            |  32 ++++++------
 man2/pciconfig_read.2  |   2 +-
 man2/perf_event_open.2 |   2 +-
 man2/personality.2     |   8 +--
 man2/prctl.2           |   2 +-
 man2/read.2            |   2 +-
 man2/reboot.2          |  24 ++++-----
 man2/semget.2          |   4 +-
 man2/sendfile.2        |   2 +-
 man2/shmget.2          |   2 +-
 man2/sigaction.2       |   4 +-
 man2/spu_run.2         |   8 +--
 man2/statfs.2          | 110 ++++++++++++++++++++---------------------
 man2/statx.2           |   2 +-
 man2/syscall.2         |   2 +-
 man2/timer_settime.2   |   4 +-
 man2/timerfd_create.2  |   2 +-
 man2/truncate.2        |   4 +-
 man2/utimensat.2       |   6 +--
 man2/write.2           |   2 +-
 39 files changed, 144 insertions(+), 144 deletions(-)
Signature · 1 line
2.39.0
#1 lore raw

PATCH 1/11 man2/shmget.2: fix limit units suffix from SI to IEC

---
 man2/shmget.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man2/shmget.2 +1 -1
index cdb2d3bee4b5..4bc18bedf3a9 100644
@@ -354,7 +354,7 @@ for a discussion of why this default value (rather than
 is used.
 .IP
 From Linux 2.2 up to Linux 3.15, the default value of
-this limit was 0x2000000 (32\ MB).
+this limit was 0x2000000 (32\ MiB).
 .IP
 Because it is not possible to map just part of a shared memory segment,
 the amount of virtual memory places another limit on the maximum size of a
#2 lore raw

Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

Quoted 3 lines · Brian Inglis
---
  man2/shmget.2 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Hi Brian,

Could you please send the patches inline?
If you fear that your mailer might break them, send them _also_ attached, but please send them inline in the email.

Cheers,

Alex

Quoted 1 line
Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
#3 lore raw

Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

On 2/6/23 00:31, Alejandro Colomar wrote:> Could you please send the patches inline?

Quoted 1 line

If you fear that your mailer might break them, send them _also_ attached, but please send them inline in the email.

Also, please send git patches, with a commit message, which can be produced with git-format-patch(1).

Cheers,

Alex

Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
#4 lore raw

Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

Quoted 6 lines · Alejandro Colomar

On 2/6/23 00:31, Alejandro Colomar wrote:
Could you please send the patches inline?

Quoted 1 line

If you fear that your mailer might break them, send them _also_ attached, but please send them inline in the email.

Also, please send git patches, with a commit message, which can be produced with git-format-patch(1).

I did my usual:

$ sed -i -e '
s!^...$!...!
	...
'
$ ...
$ git commit -m 'man2/...' man2/...
# 11 commits: 9 individual 8 files, 1 interval notation 6 files, 1 rest 33 files
$ git format-patch ... -11
$ git send-email ... 00??-...

Saw no need for longer multi-line commit messages as each was pretty specific. Please say if you prefer a different patch format or convention.

Do you expect some other email client than git to be used to send email, or do you just want all the patch diffs in a single email body or what?

Some patches may be delayed or disjoint as my ISP email is aggressively filtered by an outsourced "provider" that does not like patch series in or out and fails with no status code: "<from...> server temporarily unavailable. AUP#MXRT"!

Signature · 6 lines
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry
#5 lore raw

Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

Hi Brian,

Quoted 9 lines · Brian Inglis
Quoted 6 lines · Alejandro Colomar

On 2/6/23 00:31, Alejandro Colomar wrote:
Could you please send the patches inline?

Quoted 1 line

If you fear that your mailer might break them, send them _also_ attached, but please send them inline in the email.

Also, please send git patches, with a commit message, which can be produced with git-format-patch(1).

I did my usual:

Quoted 9 lines
$ sed -i -e '
s!^...$!...!
     ...
'
$ ...
$ git commit -m 'man2/...' man2/...
# 11 commits: 9 individual 8 files, 1 interval notation 6 files, 1 rest 33 files
$ git format-patch ... -11
$ git send-email ... 00??-...

Hmm, I thought you had sent it with something else, since I had never seen git-format-patch create such an email, but in fact it can. I guess you use --attach=... or have it configured in your git config. Could you please create the patch with git format-patch --no-attach ... ?

Quoted 5 lines

Saw no need for longer multi-line commit messages as each was pretty specific. Please say if you prefer a different patch format or convention.

Do you expect some other email client than git to be used to send email, or do you just want all the patch diffs in a single email body or what?

No, in fact I expect git with default settings :)

Quoted 2 lines

Some patches may be delayed or disjoint as my ISP email is aggressively filtered by an outsourced "provider" that does not like patch series in or out and fails with no status code: "<from...> server temporarily unavailable. AUP#MXRT"!

Cheers,

Alex

Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
#6 lore raw

Re: [PATCH 01/11] man2/shmget.2: fix limit units suffix from SI to IEC

In reply to Brian Inglis

Hi Brian,

Quoted 3 lines · Brian Inglis
---
  man2/shmget.2 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

The SI also specifies MiB. See units(7) and ⟨https://www.bipm.org/documents/20126/41483022/SI‐Brochure‐9.pdf⟩.

Cheers,

Alex

Quoted 1 line
Signature · 2 lines
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
#7 lore raw

PATCH 2/11 man2/spu_run.2: fix example comment status code or-ed value

In reply to Brian Inglis
---
 man2/spu_run.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
man2/spu_run.2 +1 -1
index 00d552986052..139f10a97a80 100644
@@ -245,7 +245,7 @@ int main(void)
         err(EXIT_FAILURE, "open");
 
     /*
-     * We should see a status code of 0x1234002:
+     * We should see a status code of 0x12340002:
      *   0x00000002 (spu was stopped due to stop\-and\-signal)
      * | 0x12340000 (the stop\-and\-signal code)
      */
#8 lore raw

PATCH 3/11 man2/: use consistent interval notation for value ranges

In reply to Brian Inglis
---
 man2/clock_getres.2    | 2 +-
 man2/clock_nanosleep.2 | 2 +-
 man2/getitimer.2       | 4 ++--
 man2/gettimeofday.2    | 2 +-
 man2/nanosleep.2       | 4 ++--
 man2/utimensat.2       | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)
man2/clock_getres.2 +1 -1
index 501c878cae4e..ee0fa6735865 100644
@@ -272,7 +272,7 @@ does not refer to a valid instance of a clock object.
 .I tp.tv_sec
 is negative or
 .I tp.tv_nsec
-is outside the range [0..999,999,999].
+is outside the range [0, 999,999,999].
 .TP
 .B EINVAL
 The
man2/clock_nanosleep.2 +1 -1
index 5afc2025c853..5da8d15699c2 100644
@@ -158,7 +158,7 @@ The sleep was interrupted by a signal handler; see
 .B EINVAL
 The value in the
 .I tv_nsec
-field was not in the range 0 to 999999999 or
+field was not in the range [0, 999999999] or
 .I tv_sec
 was negative.
 .TP
man2/getitimer.2 +2 -2
index 093752b620ed..80745dd78c99 100644
@@ -158,7 +158,7 @@ or (since Linux 2.6.22) one of the
 .I tv_usec
 fields in the structure pointed to by
 .I new_value
-contains a value outside the range 0 to 999999.
+contains a value outside the range [0, 999999].
 .SH STANDARDS
 POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).
 POSIX.1-2008 marks
@@ -253,7 +253,7 @@ POSIX.1-2001 says that
 .BR setitimer ()
 should fail if a
 .I tv_usec
-value is specified that is outside of the range 0 to 999999.
+value is specified that is outside of the range [0, 999999].
 However, up to and including Linux 2.6.21,
 Linux does not give an error, but instead silently
 adjusts the corresponding seconds value for the timer.
man2/gettimeofday.2 +1 -1
index 6f1cd33d6512..d7219f9d42a4 100644
@@ -152,7 +152,7 @@ is invalid.
 .I tv.tv_sec
 is negative or
 .I tv.tv_usec
-is outside the range [0..999,999].
+is outside the range [0, 999999].
 .TP
 .BR EINVAL " (since Linux 4.3)"
 .\" commit e1d7ba8735551ed79c7a0463a042353574b96da3
man2/nanosleep.2 +2 -2
index a6f9e627f4eb..12e0cee84b85 100644
@@ -66,7 +66,7 @@ The
 structure
 is used to specify intervals of time with nanosecond precision.
 .PP
-The value of the nanoseconds field must be in the range 0 to 999999999.
+The value of the nanoseconds field must be in the range [0, 999999999].
 .PP
 Compared to
 .BR sleep (3)
@@ -106,7 +106,7 @@ again and continue with the pause.
 .B EINVAL
 The value in the
 .I tv_nsec
-field was not in the range 0 to 999999999 or
+field was not in the range [0, 999999999] or
 .I tv_sec
 was negative.
 .SH STANDARDS
man2/utimensat.2 +1 -1
index 7f43aab7bdcf..1d9206ed0ced 100644
@@ -272,7 +272,7 @@ Invalid value in
 .B EINVAL
 Invalid value in one of the
 .I tv_nsec
-fields (value outside range 0 to 999,999,999, and not
+fields (value outside range [0, 999999999], and not
 .B UTIME_NOW
 or
 .BR UTIME_OMIT );
#9 lore raw

PATCH 4/11 man2/open.2: punctuate octal perms with digit separators

In reply to Brian Inglis
---
 man2/open.2 | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
man2/open.2 +16 -16
index fc796e25537d..82e3e2102e7c 100644
@@ -308,40 +308,40 @@ The following symbolic constants are provided for
 .RS
 .TP 9
 .B S_IRWXU
-00700 user (file owner) has read, write, and execute permission
+00\[aq]700 user (file owner) has read, write, and execute permission
 .TP
 .B S_IRUSR
-00400 user has read permission
+00\[aq]400 user has read permission
 .TP
 .B S_IWUSR
-00200 user has write permission
+00\[aq]200 user has write permission
 .TP
 .B S_IXUSR
-00100 user has execute permission
+00\[aq]100 user has execute permission
 .TP
 .B S_IRWXG
-00070 group has read, write, and execute permission
+00\[aq]070 group has read, write, and execute permission
 .TP
 .B S_IRGRP
-00040 group has read permission
+00\[aq]040 group has read permission
 .TP
 .B S_IWGRP
-00020 group has write permission
+00\[aq]020 group has write permission
 .TP
 .B S_IXGRP
-00010 group has execute permission
+00\[aq]010 group has execute permission
 .TP
 .B S_IRWXO
-00007 others have read, write, and execute permission
+00\[aq]007 others have read, write, and execute permission
 .TP
 .B S_IROTH
-00004 others have read permission
+00\[aq]004 others have read permission
 .TP
 .B S_IWOTH
-00002 others have write permission
+00\[aq]002 others have write permission
 .TP
 .B S_IXOTH
-00001 others have execute permission
+00\[aq]001 others have execute permission
 .RE
 .IP
 According to POSIX, the effect when other bits are set in
@@ -352,14 +352,14 @@ On Linux, the following bits are also honored in
 .RS
 .TP 9
 .B S_ISUID
-0004000 set-user-ID bit
+0\[aq]004\[aq]000 set-user-ID bit
 .TP
 .B S_ISGID
-0002000 set-group-ID bit (see
+0\[aq]002\[aq]000 set-group-ID bit (see
 .BR inode (7)).
 .TP
 .B S_ISVTX
-0001000 sticky bit (see
+0\[aq]001\[aq]000 sticky bit (see
 .BR inode (7)).
 .RE
 .TP
@@ -1319,7 +1319,7 @@ flags are not specified in POSIX.1-2001,
 but are specified in POSIX.1-2008.
 Since glibc 2.12, one can obtain their definitions by defining either
 .B _POSIX_C_SOURCE
-with a value greater than or equal to 200809L or
+with a value greater than or equal to 2008\[aq]09L or
 .B _XOPEN_SOURCE
 with a value greater than or equal to 700.
 In glibc 2.11 and earlier, one obtains the definitions by defining