]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
CA-40696: Use system macros for fd set sizes.
authorDaniel Stodden <daniel.stodden@citrix.com>
Fri, 23 Apr 2010 21:59:24 +0000 (14:59 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Fri, 23 Apr 2010 21:59:24 +0000 (14:59 -0700)
daemon/tapdisk-dispatch.h

index 9ae77826bf6423d8b411fae80ce3e0c79a344a96..c91f52848552d9bcaa32885cb4886ac375412e43 100644 (file)
 #ifndef _TAPDISK_DISPATCH_H_
 #define _TAPDISK_DISPATCH_H_
 
+#include <sys/select.h>
+
 #include "xs_api.h"
 #include "blktaplib.h"
 #include "tapdisk-message.h"
 
 /*
  * This goes below MAX_TAP_DEV, bound by our ipc architecture and
- * fd_set size (1024 bits, minus room for misc). Named pipes are
+ * fd_set size (typically 1024, minus room for misc). Named pipes are
  * simplex. Socketpairs might might have been a better choice.
  */
-#define TAPDISK_DAEMON_MAX_CHANNELS   ((1024 - 16) / 2)
+#define TAPDISK_DAEMON_MAX_CHANNELS   ((FD_SETSIZE - 16) / 2)
 
 typedef enum {
        TAPDISK_CHANNEL_DEAD          = 1,