Skip to contentSkip to conversation

Do not call fcntl(, O_NONBLOCK) pointlessly.

PATCH Applied Ian Jackson 1 participant 1 message Jul 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 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.

---
 vl.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
vl.c +0 -1
index 81f7d8f..4f31288 100644
@@ -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) {
Signature · 1 line
1.4.4.4