I wonder if it might not be a good idea to wrap these 3 cases in #ifdefs:
#ifdef B230400
      case 230400:
              baud = B230400;
              break;
#endif
#ifdef B460800
      case 460800:
              baud = B460800;
              break;
#endif
#ifdef B921600
      case 921600:
              baud = B921600;
              break;
#endif
I mention this because in the kernel we use (4.4.8-armada-17.02.2) I
find in .../drivers/tty/tty_ioctl.c that these rates are protected by
"#ifndef __sparc__".  I don't know if anyone much cares about
supporting Sparc any more but...

-michael

On Mon, Oct 17, 2022 at 4:08 AM <amarnagendr...@gmail.com> wrote:
>
> From: Amar Subramanyam <amarnagendr...@gmail.com>
>
> Signed-off-by: Amar Subramanyam <amarnagendr...@gmail.com>
> ---
>  serial.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/serial.c b/serial.c
> index 29cef0c..e1be165 100644
> --- a/serial.c
> +++ b/serial.c
> @@ -89,6 +89,15 @@ int serial_open(const char *name, int bps, int icrnl, int 
> hwfc)
>         case 115200:
>                 baud = B115200;
>                 break;
> +       case 230400:
> +               baud = B230400;
> +               break;
> +       case 460800:
> +               baud = B460800;
> +               break;
> +       case 921600:
> +               baud = B921600;
> +               break;
>         default:
>                 return -1;
>         }
> --
> 2.25.1
>
>
>
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to