1 CFSETISPEED(3C) Standard C Library Functions CFSETISPEED(3C) 2 3 NAME 4 cfsetispeed, cfsetospeed - set input and output baud rate 5 6 SYNOPSIS 7 #include <termios.h> 8 9 int 10 cfsetispeed(struct termios *termios_p, speed_t speed); 11 12 int 13 cfsetospeed(struct termios *termios_p, speed_t speed); 14 15 DESCRIPTION 16 The cfsetispeed() function sets the input baud rate stored in the 17 structure pointed to by termios_p to speed. 18 19 The cfsetospeed() function sets the output baud rate stored in the 20 structure pointed to by termios_p to speed. 21 22 There is no effect on the baud rates set in the hardware until a 23 subsequent successful call to tcsetattr(3C) on the same termios 24 structure. 25 26 RETURN VALUES 27 Upon successful completion, cfsetispeed() and cfsetospeed() return 0. 28 Otherwise -1 is returned, and errno may be set to indicate the error. 29 30 ERRORS 31 The cfsetispeed() and cfsetospeed() functions may fail if: 32 33 EINVAL The speed value is not a valid baud rate. 34 35 EINVAL The value of speed is outside the range of possible speed values 36 as specified in <termios.h>. 37 38 INTERFACE STABILITY 39 Standard 40 41 MT-LEVEL 42 MT-Safe 43 44 Async-Signal-Safe 45 46 SEE ALSO 47 cfgetispeed(3C), tcsetattr(3C), attributes(5), standards(5), termio(7I) 48 49 illumos January 20, 2019 illumos