xref: /illumos-gate/usr/src/man/man3c/cfsetispeed.3c (revision bbf215553c7233fbab8a0afdf1fac74c44781867)
166492cf0SYuri Pankov.\"
266492cf0SYuri Pankov.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
366492cf0SYuri Pankov.\" permission to reproduce portions of its copyrighted documentation.
466492cf0SYuri Pankov.\" Original documentation from The Open Group can be obtained online at
5c10c16deSRichard Lowe.\" http://www.opengroup.org/bookstore/.
666492cf0SYuri Pankov.\"
766492cf0SYuri Pankov.\" The Institute of Electrical and Electronics Engineers and The Open
866492cf0SYuri Pankov.\" Group, have given us permission to reprint portions of their
966492cf0SYuri Pankov.\" documentation.
1066492cf0SYuri Pankov.\"
1166492cf0SYuri Pankov.\" In the following statement, the phrase ``this text'' refers to portions
1266492cf0SYuri Pankov.\" of the system documentation.
1366492cf0SYuri Pankov.\"
1466492cf0SYuri Pankov.\" Portions of this text are reprinted and reproduced in electronic form
1566492cf0SYuri Pankov.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
1666492cf0SYuri Pankov.\" Standard for Information Technology -- Portable Operating System
1766492cf0SYuri Pankov.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
1866492cf0SYuri Pankov.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
1966492cf0SYuri Pankov.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
2066492cf0SYuri Pankov.\" between these versions and the original IEEE and The Open Group
2166492cf0SYuri Pankov.\" Standard, the original IEEE and The Open Group Standard is the referee
2266492cf0SYuri Pankov.\" document.  The original Standard can be obtained online at
2366492cf0SYuri Pankov.\" http://www.opengroup.org/unix/online.html.
2466492cf0SYuri Pankov.\"
25c10c16deSRichard Lowe.\" This notice shall appear on any product containing this material.
2666492cf0SYuri Pankov.\"
2766492cf0SYuri Pankov.\" The contents of this file are subject to the terms of the
2866492cf0SYuri Pankov.\" Common Development and Distribution License (the "License").
2966492cf0SYuri Pankov.\" You may not use this file except in compliance with the License.
3066492cf0SYuri Pankov.\"
3166492cf0SYuri Pankov.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3266492cf0SYuri Pankov.\" or http://www.opensolaris.org/os/licensing.
3366492cf0SYuri Pankov.\" See the License for the specific language governing permissions
3466492cf0SYuri Pankov.\" and limitations under the License.
3566492cf0SYuri Pankov.\"
3666492cf0SYuri Pankov.\" When distributing Covered Code, include this CDDL HEADER in each
3766492cf0SYuri Pankov.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3866492cf0SYuri Pankov.\" If applicable, add the following below this CDDL HEADER, with the
3966492cf0SYuri Pankov.\" fields enclosed by brackets "[]" replaced with your own identifying
4066492cf0SYuri Pankov.\" information: Portions Copyright [yyyy] [name of copyright owner]
4166492cf0SYuri Pankov.\"
4266492cf0SYuri Pankov.\"
4366492cf0SYuri Pankov.\" Portions Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
4466492cf0SYuri Pankov.\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
45fefbffa8SJason King.\" Copyright 2019, Joyent, Inc.
4666492cf0SYuri Pankov.\"
47fefbffa8SJason King.Dd January 20, 2019
48fefbffa8SJason King.Dt CFSETISPEED 3C
49fefbffa8SJason King.Os
50fefbffa8SJason King.Sh NAME
51fefbffa8SJason King.Nm cfsetispeed ,
52fefbffa8SJason King.Nm cfsetospeed
53fefbffa8SJason King.Nd set input and output baud rate
54fefbffa8SJason King.Sh SYNOPSIS
55fefbffa8SJason King.In termios.h
56fefbffa8SJason King.Ft int
57fefbffa8SJason King.Fo cfsetispeed
58fefbffa8SJason King.Fa "struct termios *termios_p"
59fefbffa8SJason King.Fa "speed_t speed"
60fefbffa8SJason King.Fc
61fefbffa8SJason King.Ft int
62fefbffa8SJason King.Fo cfsetospeed
63fefbffa8SJason King.Fa "struct termios *termios_p"
64fefbffa8SJason King.Fa "speed_t speed"
65fefbffa8SJason King.Fc
66fefbffa8SJason King.Sh DESCRIPTION
67fefbffa8SJason KingThe
68fefbffa8SJason King.Fn cfsetispeed
69fefbffa8SJason Kingfunction sets the input baud rate stored in the
70fefbffa8SJason Kingstructure pointed to by
71fefbffa8SJason King.Fa termios_p
72fefbffa8SJason Kingto
73fefbffa8SJason King.Fa speed .
74fefbffa8SJason King.Pp
75fefbffa8SJason KingThe
76fefbffa8SJason King.Fn cfsetospeed
77fefbffa8SJason Kingfunction sets the output baud rate stored in the
78fefbffa8SJason Kingstructure pointed to by
79fefbffa8SJason King.Fa termios_p
80fefbffa8SJason Kingto
81fefbffa8SJason King.Fa speed .
82fefbffa8SJason King.Pp
83c10c16deSRichard LoweThere is no effect on the baud rates set in the hardware until a subsequent
84fefbffa8SJason Kingsuccessful call to
85fefbffa8SJason King.Xr tcsetattr 3C
86fefbffa8SJason Kingon the same
87fefbffa8SJason King.Vt termios
88fefbffa8SJason Kingstructure.
89fefbffa8SJason King.Sh RETURN VALUES
90fefbffa8SJason KingUpon successful completion,
91fefbffa8SJason King.Fn cfsetispeed
92fefbffa8SJason Kingand
93fefbffa8SJason King.Fn cfsetospeed
94fefbffa8SJason Kingreturn
95fefbffa8SJason King.Sy 0 .
96fefbffa8SJason KingOtherwise
97fefbffa8SJason King.Sy \(mi1
98fefbffa8SJason Kingis returned, and
99fefbffa8SJason King.Va errno
100fefbffa8SJason Kingmay be set to indicate the error.
101fefbffa8SJason King.Sh ERRORS
102fefbffa8SJason KingThe
103fefbffa8SJason King.Fn cfsetispeed
104fefbffa8SJason Kingand
105fefbffa8SJason King.Fn cfsetospeed
106fefbffa8SJason Kingfunctions may fail if:
107fefbffa8SJason King.Bl -tag -width EINVAL
108fefbffa8SJason King.It Er EINVAL
109fefbffa8SJason KingThe
110fefbffa8SJason King.Fa speed
111fefbffa8SJason Kingvalue is not a valid baud rate.
112fefbffa8SJason King.It Er EINVAL
113fefbffa8SJason KingThe value of
114fefbffa8SJason King.Fa speed
115fefbffa8SJason Kingis outside the range of possible speed values as specified in
116fefbffa8SJason King.In termios.h .
117fefbffa8SJason King.El
118fefbffa8SJason King.Sh INTERFACE STABILITY
119fefbffa8SJason KingStandard
120fefbffa8SJason King.Sh MT-LEVEL
121fefbffa8SJason KingMT-Safe
122fefbffa8SJason King.Pp
123fefbffa8SJason KingAsync-Signal-Safe
124fefbffa8SJason King.Sh SEE ALSO
125fefbffa8SJason King.Xr cfgetispeed 3C ,
126fefbffa8SJason King.Xr tcsetattr 3C ,
127*bbf21555SRichard Lowe.Xr termio 4I ,
128*bbf21555SRichard Lowe.Xr attributes 7 ,
129*bbf21555SRichard Lowe.Xr standards 7
130