mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 09:53:33 +08:00
Merge pull request #2269 from mcharleb/uorb-posix-fix
Created px4_access to handle check of virtual files
This commit is contained in:
@@ -293,6 +293,16 @@ int px4_fsync(int fd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int px4_access(const char *pathname, int mode)
|
||||
{
|
||||
if (mode == F_OK) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
VDev *dev = VDev::getDev(pathname);
|
||||
return (dev != nullptr) ? 0 : -1;
|
||||
}
|
||||
|
||||
void px4_show_devices()
|
||||
{
|
||||
VDev::showDevices();
|
||||
|
||||
Reference in New Issue
Block a user