xiaoxiang781216 commented on a change in pull request #5345:
URL: https://github.com/apache/incubator-nuttx/pull/5345#discussion_r794742516



##########
File path: fs/mount/fs_automount.c
##########
@@ -551,6 +862,28 @@ FAR void *automount_initialize(FAR const struct 
automount_lower_s *lower)
       ferr("ERROR: Failed to schedule work: %d\n", ret);
     }
 
+#ifdef CONFIG_FS_AUTOMOUNTER_DRIVER
+
+  /* Initialize the new automount driver instance */
+
+  nxsem_init(&priv->exclsem, 0, 1);
+
+  /* Register driver */
+
+  sprintf(devpath, CONFIG_FS_AUTOMOUNTER_VFS_PATH "/automount%u",

Review comment:
       why not register driver at:
   sprintf(devpath, CONFIG_FS_AUTOMOUNTER_VFS_PATH "%s", lower->mountpoint);

##########
File path: fs/mount/fs_automount.c
##########
@@ -75,24 +87,305 @@ struct automounter_state_s
   struct wdog_s wdog;                        /* Delay to retry un-mounts */
   bool mounted;                              /* True: Volume has been mounted 
*/
   bool inserted;                             /* True: Media has been inserted 
*/
+
+#ifdef CONFIG_FS_AUTOMOUNTER_DRIVER
+  sem_t exclsem;                             /* Supports exclusive access to 
the device */
+  bool registered;                           /* True: if driver has been 
registered */
+
+  /* The following is a singly linked list of open references to the
+   * automounter device.
+   */
+
+  FAR struct automounter_open_s *ao_open;
+#endif /* CONFIG_FS_AUTOMOUNTER_DRIVER */
+};
+
+/* This structure describes the state of one open button driver instance */
+
+#ifdef CONFIG_FS_AUTOMOUNTER_DRIVER
+struct automounter_open_s
+{
+  /* Supports a singly linked list */
+
+  FAR struct automounter_open_s *ao_flink;
+
+  /* Button event notification information */

Review comment:
       Remove Button




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to