From nobody Fri Dec 19 22:03:39 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1587939563; cv=none; d=zohomail.com; s=zohoarc; b=VR9xT+16m2ywpRHIlGoCBO78PIYifNs7Kjw7Pq4r9BGWO1ADBVOnAvp2XWReWVq6+YCuyFO3zolDng9Ut+2jl2y2btjn32g+HL4ENGZdDlZRZA8+nJrd75aqUU68DrulA2IIJ6QC9zwYQNXPrj1ts7rIxQFKKt4fhusmQ/AKZjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587939563; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=zgV7/9k3Hto6rUVeJ6s8ZLt/qfEkaj7t1R0wnIL3X6o=; b=M5KxTmOoshBsc5gOYj3/znXvN/Zbn/j9k5JEHoF7aBFZML/StLuPnmQRFPQ/2dCYmZ8q9p/Y/2QvryRJvt9NEu7liNP1oxhGt90ZsOpkLvLK2xkxxiOdKsQjlhtmltHfxKsh825BrGGLaGjFEKeuUoY7IbvpTrFXeuumvRJfOpA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1587939563020945.1763893687086; Sun, 26 Apr 2020 15:19:23 -0700 (PDT) Received: from localhost ([::1]:47822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSpcO-0006sk-3G for importer@patchew.org; Sun, 26 Apr 2020 18:19:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60712) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSoZf-0000Bi-QQ for qemu-devel@nongnu.org; Sun, 26 Apr 2020 17:12:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSoZf-00061a-4M for qemu-devel@nongnu.org; Sun, 26 Apr 2020 17:12:27 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jSoZe-00061P-GD; Sun, 26 Apr 2020 17:12:26 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D11FC5C0118; Sun, 26 Apr 2020 17:12:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 26 Apr 2020 17:12:23 -0400 Received: from newton.malta.dottedmag.net (c34-228.i07-9.onvol.net [92.251.34.228]) by mail.messagingengine.com (Postfix) with ESMTPA id 566AE3280067; Sun, 26 Apr 2020 17:12:23 -0400 (EDT) Received: by newton.malta.dottedmag.net (Postfix, from userid 501) id 2654F2CE1CF5; Sun, 26 Apr 2020 23:12:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dottedmag.net; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=zgV7/9k3Hto6rUVeJ6s8ZLt/qf Ekaj7t1R0wnIL3X6o=; b=PeZEBz7+eJbhoBUDGw9nt13MTe6nMKvZ2hxgCNRYfL Y7is5YTkSymjYSYwWcmiz5s3zeJuFGu3/xccky738FMhjGHD0WjF1M4lhrU1PpDn RnuK8sR8USmeLsayBjMpowYavI/NX0vJxOflwwGV2NqgcYLZ7aFpWe6fT9lT5bFl gPsN+SZCFJmG0pNFqPHJ0479f20NyE8FWlQGJIo/uNXcGRV9JzSJHgy+Fh4ZWQTF F344rF9Em6T6sUbktWra53duMGA9E3/j5sKZa8NVMaxywg0PcpGODKCLE5jCkQ11 L6iL+ELZ2kgtOF1GEoOHreAzQwbeU6d/IM1GyPtgD4KQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=zgV7/9k3Hto6rUVeJ 6s8ZLt/qfEkaj7t1R0wnIL3X6o=; b=mkWyZJMQhA9Xzp9PlXDax5ssqYKu3jkAC QNPDoMD7U/qyLLInkOlTWYC5un7hmEF1yJyEz1AfHh/zzszM3esdujoSSBjovXAc CrYwmIBAizCYjTEyyE3kyzfNZvorSwbaa/3Ag709aM5vIlnLGSfozSjk2sKagsX0 z619rrCnU9GXgAFkVZCNnBJeUHec5eIMaaQe/Lco9aAKGoKDK7gGlXx2ZFocfYMA g5oDPD+d00o/GUiTeswIUAfEzXZz1IEcMeaAB4Cr1/Rr+wjCiUdfU65Oh56klnYQ nzDxP0nG0OIlU5TdplGHz14Qfz+ThrBtZX1Hlz5/yA2WfzDe7BJWw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheejgdduheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepofhikhhhrghilhcuifhushgrrhhovhcuoeguohhtthgvughmrghg seguohhtthgvughmrghgrdhnvghtqeenucfkphepledvrddvhedurdefgedrvddvkeenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeguohhtthgv ughmrghgseguohhtthgvughmrghgrdhnvght X-ME-Proxy: From: Mikhail Gusarov To: qemu-devel@nongnu.org Subject: [PATCH] chardev: Add macOS to list of OSes that support -chardev serial Date: Sun, 26 Apr 2020 23:09:58 +0200 Message-Id: <20200426210956.17324-1-dottedmag@dottedmag.net> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=66.111.4.25; envelope-from=dottedmag@dottedmag.net; helo=out1-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/26 17:12:23 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 X-Mailman-Approved-At: Sun, 26 Apr 2020 18:16:21 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Mikhail Gusarov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" macOS API for dealing with serial ports/ttys is identical to BSDs. Signed-off-by: Mikhail Gusarov Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- 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, =20 #elif defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly_= _) \ - || defined(__GLIBC__) + || defined(__GLIBC__) || defined(__APPLE__) =20 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 =20 --=20 2.19.1