You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/11/06 19:03:01 UTC

[GitHub] ccollins476ad commented on a change in pull request #1510: shell; add ls_dev command to list OS devices.

ccollins476ad commented on a change in pull request #1510: shell; add ls_dev command to list OS devices.
URL: https://github.com/apache/mynewt-core/pull/1510#discussion_r231249226
 
 

 ##########
 File path: kernel/os/include/os/os_dev.h
 ##########
 @@ -253,6 +253,13 @@ int os_dev_close(struct os_dev *dev);
  */
 void os_dev_reset(void);
 
+/**
+ * Walk through all devices, calling callback for every device.
+ *
+ * @param walk_func Function to call
+ */
+void os_dev_walk(void (*walk_func)(struct os_dev *));
 
 Review comment:
   It might be a good idea if the callback function:
   1. Takes an additional `void *` argument.
   2. Returns int; nonzero means abort the walk.
   
   These aren't necessary for this feature, but I think we will probably want them later.  Easier to do it now than to change it later.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services