aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'termios')
-rw-r--r--termios/cfsetspeed.c8
-rw-r--r--termios/termios.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/termios/cfsetspeed.c b/termios/cfsetspeed.c
index b3c8aa3f42..91f420163e 100644
--- a/termios/cfsetspeed.c
+++ b/termios/cfsetspeed.c
@@ -102,7 +102,7 @@ static struct speed_struct
/* Set both the input and output baud rates stored in *TERMIOS_P to SPEED. */
-void
+int
cfsetspeed (struct termios *termios_p, speed_t speed)
{
size_t cnt;
@@ -112,14 +112,16 @@ cfsetspeed (struct termios *termios_p, speed_t speed)
{
cfsetispeed (termios_p, speed);
cfsetospeed (termios_p, speed);
- return;
+ return 0;
}
else if (speed == speeds[cnt].value)
{
cfsetispeed (termios_p, speeds[cnt].internal);
cfsetospeed (termios_p, speeds[cnt].internal);
- return;
+ return 0;
}
__set_errno (EINVAL);
+
+ return -1;
}
diff --git a/termios/termios.h b/termios/termios.h
index 342b0607a2..a55ddbc7a2 100644
--- a/termios/termios.h
+++ b/termios/termios.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 96 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 96, 97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -51,7 +51,7 @@ extern int cfsetispeed __P ((struct termios *__termios_p, speed_t __speed));
#ifdef __USE_BSD
/* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */
-extern void cfsetspeed __P ((struct termios *__termios_p, speed_t __speed));
+extern int cfsetspeed __P ((struct termios *__termios_p, speed_t __speed));
#endif