Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJqaG-0005GY-Qe for qemu-devel@nongnu.org; Fri, 18 Jul 2008 10:05:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJqaF-0005Fe-4W for qemu-devel@nongnu.org; Fri, 18 Jul 2008 10:05:20 -0400 Received: from [199.232.76.173] (port=47956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJqaF-0005Fb-0g for qemu-devel@nongnu.org; Fri, 18 Jul 2008 10:05:19 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:43956) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJqaE-0005Jp-EI for qemu-devel@nongnu.org; Fri, 18 Jul 2008 10:05:18 -0400 Received: from mariner.uk.xensource.com ([10.80.2.22]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id m6IE5GiL025470 for ; Fri, 18 Jul 2008 07:05:17 -0700 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1KJqa3-000674-Jm for qemu-devel@nongnu.org; Fri, 18 Jul 2008 15:05:07 +0100 From: Ian Jackson Date: Fri, 18 Jul 2008 14:15:01 +0100 Message-Id: Subject: [Qemu-devel] [PATCH 1/3] Do not call fcntl(, O_NONBLOCK) pointlessly. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org It is silly to call fcntl(fd,F_SETFL,O_NONBLOCK) immediately after opening the fd in nonblocking mode. Signed-off-by: Ian Jackson --- vl.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 81f7d8f..4f31288 100644 --- a/vl.c +++ b/vl.c @@ -2435,7 +2435,6 @@ static CharDriverState *qemu_chr_open_tty(const char *filename) int fd; TFR(fd = open(filename, O_RDWR | O_NONBLOCK)); - fcntl(fd, F_SETFL, O_NONBLOCK); tty_serial_init(fd, 115200, 'N', 8, 1); chr = qemu_chr_open_fd(fd, fd); if (!chr) { -- 1.4.4.4