diff options
Diffstat (limited to 'core/device.cpp')
-rw-r--r-- | core/device.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/device.cpp b/core/device.cpp index bd1d75416..47ce72b17 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -392,6 +392,13 @@ extern "C" const struct device *get_device(const struct device_table *table, int return &table->devices[i]; } +extern "C" struct device *get_device_mutable(struct device_table *table, int i) +{ + if (i < 0 || i > nr_devices(table)) + return NULL; + return &table->devices[i]; +} + extern "C" const char *device_get_model(const struct device *dev) { return dev ? dev->model.c_str() : NULL; |