]> xenbits.xensource.com Git - qemu-xen-4.0-testing.git/commitdiff
Do not call fcntl(, O_NONBLOCK) pointlessly.
authorIan Jackson <iwj@mariner.uk.xensource.com>
Fri, 18 Jul 2008 13:15:01 +0000 (14:15 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Jul 2008 13:36:56 +0000 (14:36 +0100)
It is silly to call fcntl(fd,F_SETFL,O_NONBLOCK) immediately after
opening the fd in nonblocking mode.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
vl.c

diff --git a/vl.c b/vl.c
index 81f7d8fbb87ec93b169dc0fb5d1f444b1a29cde7..4f31288fe712ecab2d7cb7394a6ca2242465d8e7 100644 (file)
--- 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) {