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