cfsetspeed

Name

cfsetspeed -- set terminal input and output data rate

Synopsis

#include <termios.h>

int cfsetspeed(struct termios *t, speed_t speed);

Description

The cfsetspeed() function shall set the input and output speeds in t to the value specified by speed. The effects of the function on the terminal as described below do not become effective, nor are all errors detected, until the tcsetattr() function is called. Certain values for baud rates set in termios and passed to tcsetattr() have special meanings.

Return Value

On success, 0 is returned. On error, -1 is returned and the global variable errno is set appropriately.

Errors

EINVAL 

Invalid speed argument