All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Mikhail Gusarov <dottedmag@dottedmag.net>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [PATCH] chardev: Add macOS to list of OSes that support -chardev serial
Date: Mon, 27 Apr 2020 12:17:19 +0200	[thread overview]
Message-ID: <4e9edcaf-d623-b5c6-fdf9-0d649ef8ba2d@amsat.org> (raw)
In-Reply-To: <20200426210956.17324-1-dottedmag@dottedmag.net>

On 4/26/20 11:09 PM, Mikhail Gusarov wrote:
> macOS API for dealing with serial ports/ttys is identical to BSDs.
> 
> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
> ---
> 
> Note that the same file has a line
>> #endif /* linux || sun */
> that is severely out of date.
> 
>  chardev/char-serial.c | 2 +-
>  include/qemu/osdep.h  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/chardev/char-serial.c b/chardev/char-serial.c
> index 5b833ea077..7c3d84ae24 100644
> --- a/chardev/char-serial.c
> +++ b/chardev/char-serial.c
> @@ -53,7 +53,7 @@ static void qmp_chardev_open_serial(Chardev *chr,
>  
>  #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)      \
>      || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
> -    || defined(__GLIBC__)
> +    || defined(__GLIBC__) || defined(__APPLE__)
>  
>  static void tty_serial_init(int fd, int speed,
>                              int parity, int data_bits, int stop_bits)
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index 20f5c5f197..ff7c17b857 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -379,7 +379,7 @@ void qemu_anon_ram_free(void *ptr, size_t size);
>  #define HAVE_CHARDEV_SERIAL 1
>  #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__)    \
>      || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
> -    || defined(__GLIBC__)
> +    || defined(__GLIBC__) || defined(__APPLE__)
>  #define HAVE_CHARDEV_SERIAL 1
>  #endif
>  
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  reply	other threads:[~2020-04-27 10:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-26 21:09 [PATCH] chardev: Add macOS to list of OSes that support -chardev serial Mikhail Gusarov
2020-04-27 10:17 ` Philippe Mathieu-Daudé [this message]
2020-05-04  9:48 ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e9edcaf-d623-b5c6-fdf9-0d649ef8ba2d@amsat.org \
    --to=f4bug@amsat.org \
    --cc=dottedmag@dottedmag.net \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.