[svn-commits] fjoe: freebsd/trunk r9251 - /freebsd/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 2 04:19:50 CDT 2010


Author: fjoe
Date: Thu Sep  2 04:19:46 2010
New Revision: 9251

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9251
Log:
Fix handling of O_NONBLOCK setting via F_SETFL fcntl.

Modified:
    freebsd/trunk/drivers/dahdi/dahdi-base.c

Modified: freebsd/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9251&r1=9250&r2=9251
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi-base.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi-base.c Thu Sep  2 04:19:46 2010
@@ -42,6 +42,7 @@
 #include <sys/kernel.h>
 #include <sys/fcntl.h>
 #include <sys/ioccom.h>
+#include <sys/filio.h>
 #include <sys/libkern.h>
 #include <sys/malloc.h>
 #include <sys/module.h>
@@ -5805,19 +5806,15 @@
 
 	switch(cmd) {
 #if defined(__FreeBSD__)
-	case F_SETFL: {
+	case FIONBIO:
 		get_user(j, data);
-
-		/*
-		 * XXX: On the moment we're interested only in O_NONBLOCK
-		 * Need any other flags?
-		 */
-		if ((j & O_NONBLOCK) != 0)
+		if (j)
 			chan->file_flags |= O_NONBLOCK;
 		else
 			chan->file_flags &= ~O_NONBLOCK;
 		break;
-	}
+	case FIOASYNC:
+		break;
 #endif /* __FreeBSD__ */
 	case DAHDI_SETSIGFREEZE:
 		get_user(j, (int __user *)data);




More information about the svn-commits mailing list