[vlc-commits] DTV: open device nodes in non-blocking mode

Rémi Denis-Courmont git at videolan.org
Mon Aug 18 18:05:58 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 18 19:04:58 2014 +0300| [3d549e2bc9909c58a9db24c6d1f72d21fb044d07] | committer: Rémi Denis-Courmont

DTV: open device nodes in non-blocking mode

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3d549e2bc9909c58a9db24c6d1f72d21fb044d07
---

 modules/access/dtv/linux.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/access/dtv/linux.c b/modules/access/dtv/linux.c
index 9f289a3..67b7159 100644
--- a/modules/access/dtv/linux.c
+++ b/modules/access/dtv/linux.c
@@ -181,10 +181,7 @@ static int dvb_open_node (dvb_device_t *d, const char *type, int flags)
     char path[strlen (type) + 4];
 
     snprintf (path, sizeof (path), "%s%u", type, d->device);
-    fd = vlc_openat (d->dir, path, flags);
-    if (fd != -1)
-        fcntl (fd, F_SETFL, fcntl (fd, F_GETFL) | O_NONBLOCK);
-    return fd;
+    return vlc_openat (d->dir, path, flags | O_NONBLOCK);
 }
 
 /**



More information about the vlc-commits mailing list