diff options
author | Andrew Tridgell <tridge@samba.org> | 2014-07-08 21:37:45 +1000 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-07-12 16:26:21 +0200 |
commit | 6cffa948fe6edc1e58b7d55acf119e8793461510 (patch) | |
tree | 3eaee2cff3a1a9ae41f46198819e571a6ee50f51 | |
parent | c6b0dc1ee85348d8dbe398457e9631e095ec9c61 (diff) | |
download | px4-firmware-6cffa948fe6edc1e58b7d55acf119e8793461510.tar.gz px4-firmware-6cffa948fe6edc1e58b7d55acf119e8793461510.tar.bz2 px4-firmware-6cffa948fe6edc1e58b7d55acf119e8793461510.zip |
device: pass CDev::ioctl() to superclass
this allows DEVIOCGDEVICEID to work.
-rw-r--r-- | src/drivers/device/cdev.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/device/cdev.cpp b/src/drivers/device/cdev.cpp index 6e2ebb1f7..39fb89501 100644 --- a/src/drivers/device/cdev.cpp +++ b/src/drivers/device/cdev.cpp @@ -268,6 +268,13 @@ CDev::ioctl(struct file *filp, int cmd, unsigned long arg) break; } + /* try the superclass. The different ioctl() function form + * means we need to copy arg */ + unsigned arg2 = arg; + int ret = Device::ioctl(cmd, arg2); + if (ret != -ENODEV) + return ret; + return -ENOTTY; } |