- increase max number of devices to 200
- increase max number of file descriptors to 200
- add warning if number of file descriptor exceeds max value
This commit is contained in:
tumbili
2015-06-23 18:32:40 +02:00
parent ad1158b548
commit 7043869237
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ private:
px4_dev_t() {} px4_dev_t() {}
}; };
#define PX4_MAX_DEV 100 #define PX4_MAX_DEV 200
static px4_dev_t *devmap[PX4_MAX_DEV]; static px4_dev_t *devmap[PX4_MAX_DEV];
/* /*
+2 -1
View File
@@ -75,7 +75,7 @@ static void *timer_handler(void *data)
return 0; return 0;
} }
#define PX4_MAX_FD 100 #define PX4_MAX_FD 200
static device::file_t *filemap[PX4_MAX_FD] = {}; static device::file_t *filemap[PX4_MAX_FD] = {};
int px4_errno; int px4_errno;
@@ -117,6 +117,7 @@ int px4_open(const char *path, int flags, ...)
ret = dev->open(filemap[i]); ret = dev->open(filemap[i]);
} }
else { else {
PX4_WARN("exceeded maximum number of file descriptors!");
ret = -ENOENT; ret = -ENOENT;
} }
} }