Add a routine that returns a boolean indicating whether the adapter constant poll option is enabled or not. Signed-off-by: Mark Greer <mgreer@xxxxxxxxxxxxxxx> --- src/adapter.c | 5 +++++ src/near.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index e8c7c61..9c483ca 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -578,6 +578,11 @@ void __near_adapter_destroy(struct near_adapter *adapter) free_adapter(adapter); } +bool __near_adapter_is_constant_poll(struct near_adapter *adapter) +{ + return adapter->constant_poll; +} + const char *__near_adapter_get_path(struct near_adapter *adapter) { return adapter->path; diff --git a/src/near.h b/src/near.h index 7795e61..50a4c8b 100644 --- a/src/near.h +++ b/src/near.h @@ -78,6 +78,7 @@ void __near_manager_cleanup(void); struct near_adapter *__near_adapter_create(uint32_t idx, const char *name, uint32_t protocols, bool powered); void __near_adapter_destroy(struct near_adapter *adapter); +bool __near_adapter_is_constant_poll(struct near_adapter *adapter); const char *__near_adapter_get_path(struct near_adapter *adapter); struct near_adapter *__near_adapter_get(uint32_t idx); int __near_adapter_add(struct near_adapter *adapter); -- 2.13.0