From: Ian Jackson Date: Fri, 18 Jul 2008 13:15:01 +0000 (+0100) Subject: Do not call fcntl(, O_NONBLOCK) pointlessly. X-Git-Tag: xen-3.3.0-rc1~20^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=bcd75c00eef9506ba34474eaccd703b30942cc5e;p=qemu-xen-3.3-testing.git Do not call fcntl(, O_NONBLOCK) pointlessly. It is silly to call fcntl(fd,F_SETFL,O_NONBLOCK) immediately after opening the fd in nonblocking mode. Signed-off-by: Ian Jackson --- diff --git a/vl.c b/vl.c index 81f7d8fb..4f31288f 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) {