POSIX: Fixed px4_open code to not create a file when opening a device

The code to created a virtual file was preventing the creation of
device nodes.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-05-07 10:50:23 -07:00
parent 4216a0d64d
commit 99822038f3
2 changed files with 7 additions and 5 deletions
+3 -3
View File
@@ -451,9 +451,9 @@ VDev *VDev::getDev(const char *path)
printf("VDev::getDev\n");
int i=0;
for (; i<PX4_MAX_DEV; ++i) {
if (devmap[i]) {
printf("%s %s\n", devmap[i]->name, path);
}
//if (devmap[i]) {
// printf("%s %s\n", devmap[i]->name, path);
//}
if (devmap[i] && (strcmp(devmap[i]->name, path) == 0)) {
return (VDev *)(devmap[i]->cdev);
}