mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 10:30:35 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user