Skip to contentSkip to conversation

termios.3: Add information how to set baudrate to any other value

PATCH Superseded Pali Rohár 3 participants 10 messages Jul 30, 2021 – Aug 1, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 termios.3: Add information how to set baudrate to any other value

---
 man3/termios.3 | 6 ++++++
 1 file changed, 6 insertions(+)
man3/termios.3 +6 -0
index b7cdec507524..4d4593a33c32 100644
@@ -967,6 +967,12 @@ Normally, this will disconnect the line.
 \fBCBAUDEX\fP is a mask
 for the speeds beyond those defined in POSIX.1 (57600 and above).
 Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
+Setting baudrate to other value than defined by
+.B Bnnn
+constants is possible via
+.B TCSETS2
+ioctl, see
+.BR ioctl_tty (2).
 .PP
 .BR cfgetispeed ()
 returns the input baud rate stored in the \fItermios\fP structure.
Signature · 1 line
2.20.1
#1 lore raw

Hi Pali,

Quoted 1 line · Pali Rohár

Please see some comments below.

Thanks,

Alex

man3/termios.3 Normally, this will disconnect the line. · line 969

Quoted 12 lines
---
  man3/termios.3 | 6 ++++++
  1 file changed, 6 insertions(+)
man3/termios.3 +0 -0
index b7cdec507524..4d4593a33c32 100644
@@ -967,6 +967,12 @@ Normally, this will disconnect the line.
  \fBCBAUDEX\fP is a mask
  for the speeds beyond those defined in POSIX.1 (57600 and above).
  Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.

I think this should go on a separate paragraph, don't you?

.PP?

man3/termios.3 Normally, this will disconnect the line. · line 970

Quoted 1 line
man3/termios.3 +1 -0
+Setting baudrate to other value than defined by

wfix?:

Setting the baud rate to a value other that those defined by

man3/termios.3 Normally, this will disconnect the line. · line 972

Quoted 2 lines
man3/termios.3 +2 -0
+.B Bnnn
+constants is possible via

s/via/via the/?

man3/termios.3 Normally, this will disconnect the line. · line 974

Quoted 2 lines
man3/termios.3 +2 -0
+.B TCSETS2
+ioctl, see

s/,/;/

Quoted 5 lines
man3/termios.3 +1 -0
+.BR ioctl_tty (2).
  .PP
  .BR cfgetispeed ()
  returns the input baud rate stored in the \fItermios\fP structure.
Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#2 lore raw

Hi, Pali & Alex!

Quoted 4 lines · Alejandro Colomar (man-pages)
Quoted 2 lines

for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.

I think this should go on a separate paragraph, don't you?

I would line break after the comma, quote the multiword literal in case the bold attribute gets stripped out of the output (copying and pasting man page text into emails, for instance), and use font style macros instead of font selection escape sequences.

Quoted 7 lines

.PP?

Quoted 1 line

+Setting baudrate to other value than defined by

wfix?:

Setting the baud rate to a value other that those defined by

I'd say "baud rate" as two words in English prose (contrast with C), but "than" is correct.

Quoted 4 lines
Quoted 2 lines

+.B Bnnn
+constants is possible via

s/via/via the/?

I agree.

Quoted 5 lines
Quoted 3 lines

+.B TCSETS2
+ioctl, see

s/,/;/

I agree. Comma splices are evil.

Incidentally, when checking for semantic newline issues, I use the following search pattern in Vim.

/[.;:].

Strictly, I should say

/[.;:!?][^\\]

and were to bind that to a key, that's probably what I'd use.

Regards,
Branden

#3 lore raw

Hi Branden,

Quoted 6 lines · G. Branden Robinson

Hi, Pali & Alex!

Quoted 3 lines · Alejandro Colomar (man-pages)
Quoted 2 lines

for the speeds beyond those defined in POSIX.1 (57600 and above). Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.

Quoted 6 lines
Quoted 1 line

I think this should go on a separate paragraph, don't you?

I would line break after the comma, quote the multiword literal in case the bold attribute gets stripped out of the output (copying and pasting man page text into emails, for instance), and use font style macros instead of font selection escape sequences.

I would too, but that was already existing text that was out of the scope of this patch :/

Quoted 11 lines
Quoted 8 lines

.PP?

Quoted 1 line

+Setting baudrate to other value than defined by

wfix?:

Setting the baud rate to a value other that those defined by

I'd say "baud rate" as two words in English prose (contrast with C), but "than" is correct.

Ouch! I meant "than"; "that" was a typo that I introduced. As I already applied the patch, I'll fix it myself in my tree before sending it to Michael.

Thanks,

Alex

Quoted 30 lines
Quoted 5 lines
Quoted 3 lines

+.B Bnnn
+constants is possible via

s/via/via the/?

I agree.

Quoted 5 lines
Quoted 3 lines

+.B TCSETS2
+ioctl, see

s/,/;/

I agree. Comma splices are evil.

Incidentally, when checking for semantic newline issues, I use the following search pattern in Vim.

/[.;:].

Strictly, I should say

/[.;:!?][^\\]

and were to bind that to a key, that's probably what I'd use.

Regards,
Branden

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#4 lore raw

PATCH v2 1/1 termios.3: Add information how to set baud rate to any other value

In reply to Pali Rohár
---
 man3/termios.3 | 7 +++++++
 1 file changed, 7 insertions(+)
man3/termios.3 +7 -0
index b7cdec507524..7b195c95912b 100644
@@ -968,6 +968,13 @@ Normally, this will disconnect the line.
 for the speeds beyond those defined in POSIX.1 (57600 and above).
 Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
 .PP
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the
+.B TCSETS2
+ioctl; see
+.BR ioctl_tty (2).
+.PP
 .BR cfgetispeed ()
 returns the input baud rate stored in the \fItermios\fP structure.
 .PP
Signature · 1 line
2.20.1
#5 lore raw

Re: [PATCH v2] termios.3: Add information how to set baud rate to any other value

Hi Pali,

Quoted 1 line · Pali Rohár

Patch applied. Thanks,

Alex

Quoted 23 lines
---
  man3/termios.3 | 7 +++++++
  1 file changed, 7 insertions(+)
man3/termios.3 +7 -0
index b7cdec507524..7b195c95912b 100644
@@ -968,6 +968,13 @@ Normally, this will disconnect the line.
  for the speeds beyond those defined in POSIX.1 (57600 and above).
  Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
  .PP
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the
+.B TCSETS2
+ioctl; see
+.BR ioctl_tty (2).
+.PP
  .BR cfgetispeed ()
  returns the input baud rate stored in the \fItermios\fP structure.
  .PP
Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#6 lore raw

Re: [PATCH v2] termios.3: Add information how to set baud rate to any other value

In reply to Pali Rohár

Hi, Pali!

man3/termios.3 Normally, this will disconnect the line. · line 973

Quoted 3 lines · Pali Rohár
man3/termios.3 +3 -0
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the

I'd say

.BI B nnn

because the "nnn" is not literal, but variable.

Regards,
Branden

#7 lore raw

Re: [PATCH v2] termios.3: Add information how to set baud rate to any other value

Hi Branden,

Quoted 9 lines · G. Branden Robinson

Hi, Pali!

man3/termios.3 Normally, this will disconnect the line. · line 973

Quoted 3 lines · Pali Rohár
man3/termios.3 +3 -0
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the

I'd say

Quoted 3 lines

.BI B nnn

because the "nnn" is not literal, but variable.

Agree.

But as I already merged the patch, I'll add a new patch with that change. Moreover, man pages mostly-consistently use .B Bnn style (although incorrectly, from reading groff_man(7)), so it deserves a separate patch.

Thanks,

Ale

Quoted 4 lines

Regards,
Branden

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#8 lore raw

Re: [PATCH v2] termios.3: Add information how to set baud rate to any other value

Quoted 14 lines · On Saturday 31 July 2021 13:04:50 Alejandro Colomar (man-pages) wrote:

Hi Branden,

Quoted 11 lines · G. Branden Robinson

Hi, Pali!

man3/termios.3 Normally, this will disconnect the line. · line 973

Quoted 3 lines · Pali Rohár
man3/termios.3 +3 -0
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the

I'd say

.BI B nnn

Quoted 7 lines
Quoted 1 line

because the "nnn" is not literal, but variable.

Agree.

But as I already merged the patch, I'll add a new patch with that change. Moreover, man pages mostly-consistently use .B Bnn style (although incorrectly, from reading groff_man(7)), so it deserves a separate patch.

Makes sense. Would you fix style on all places ('git grep Bnn')?

Quoted 14 lines

Thanks,

Ale

Quoted 4 lines

Regards,
Branden

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#9 lore raw

Re: [PATCH v2] termios.3: Add information how to set baud rate to any other value

Hi Pali,

Quoted 17 lines · Pali Rohár
Quoted 16 lines · On Saturday 31 July 2021 13:04:50 Alejandro Colomar (man-pages) wrote:

Hi Branden,

Quoted 12 lines · G. Branden Robinson

Hi, Pali!

man3/termios.3 Normally, this will disconnect the line. · line 973

Quoted 3 lines · Pali Rohár
man3/termios.3 +3 -0
+Setting the baud rate to a value other that those defined by
+.B Bnnn
+constants is possible via the

I'd say

.BI B nnn

because the "nnn" is not literal, but variable.

Quoted 7 lines
Quoted 5 lines

Agree.

But as I already merged the patch, I'll add a new patch with that change. Moreover, man pages mostly-consistently use .B Bnn style (although incorrectly, from reading groff_man(7)), so it deserves a separate patch.

Makes sense. Would you fix style on all places ('git grep Bnn')?

I fixed it right now for Bnnn: <https://github.com/alejandro-colomar/man-pages/commit/e505393f80d040a03f3c2955e0d236c8e109ee6e>

I'll try to fix it for every other case of FOO* in the pages soon.

Regards,

Alex

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/