You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/02/01 11:51:11 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5345: fs_automount: add options for signaling when volume is mounted and unmounted

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



##########
File path: fs/mount/fs_automount.c
##########
@@ -551,6 +862,37 @@ 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);
+
+  devpath = kmm_zalloc(sizeof(CONFIG_FS_AUTOMOUNTER_VFS_PATH) +

Review comment:
       Another way is use PATH_MAX

##########
File path: include/nuttx/fs/ioctl.h
##########
@@ -177,6 +177,12 @@
                                            * OUT: None
                                            */
 
+#define FIOC_NOTIFY     _FIOC(0x000e)     /* IN:  Pointer to struct automount_notify_s

Review comment:
       FIOC_AUTOMOUNT_NOTIFY?

##########
File path: fs/Kconfig
##########
@@ -42,6 +42,22 @@ config FS_AUTOMOUNTER_DEBUG
 		system debug is not enable.  This is useful primarily for in vivo
 		unit testing of the auto-mount feature.
 
+config FS_AUTOMOUNTER_DRIVER
+	bool "Auto-mounter driver"
+	default n
+	depends on FS_AUTOMOUNTER
+	---help---
+		Enabling this option will lead to registering of a character driver
+		on FS_AUTOMOUNTER_VFS_PATH + mount point path for auto-mounter.
+		Example: /var/mount/mnt/sdcard0
+		
+config FS_AUTOMOUNTER_VFS_PATH
+	string "Path to auto-mounter driver"
+	default "/var/mount"

Review comment:
       let's change the default to /var, so the final path is /var/mnt/sdcard0




-- 
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-unsubscribe@nuttx.apache.org

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