casaroli commented on code in PR #21907:
URL: https://github.com/apache/nuttx/pull/21907#discussion_r4659181325
##########
fs/mount/fs_umount2.c:
##########
@@ -183,6 +187,38 @@ int nx_umount2(FAR const char *target, unsigned int flags)
goto errout_with_lock;
}
+ /* A file system that holds the current directory of a task group is
+ * busy. The tree lock keeps the mount point path as it is.
+ */
+
+ path = lib_get_pathbuffer();
Review Comment:
Done.
##########
fs/vfs/fs_cwd.c:
##########
@@ -519,6 +710,100 @@ int fs_cwd_join(FAR const char *path, FAR char *buffer,
size_t buflen)
return ret < 0 ? ret : len + 1;
}
+/****************************************************************************
+ * Name: fs_cwd_renamed
+ *
+ * Description:
+ * See fs/inode/inode.h.
+ *
+ ****************************************************************************/
+
+void fs_cwd_renamed(FAR const char *oldpath, FAR const char *newpath)
+{
+ FAR char *oldhost;
+ FAR char *newhost;
+
+ if (list_is_empty(&g_cwd_list))
+ {
+ return;
+ }
+
+ oldhost = lib_get_pathbuffer();
+ newhost = lib_get_pathbuffer();
+ if (oldhost != NULL && newhost != NULL &&
+ cwd_hostpath(oldpath, oldhost) >= 0 &&
+ cwd_hostpath(newpath, newhost) >= 0)
+ {
+ cwd_rename(oldhost, newhost);
+ }
+
+ if (newhost != NULL)
+ {
+ lib_put_pathbuffer(newhost);
+ }
+
+ if (oldhost != NULL)
+ {
+ lib_put_pathbuffer(oldhost);
+ }
+}
+
+/****************************************************************************
+ * Name: fs_cwd_removed
+ *
+ * Description:
+ * See fs/inode/inode.h.
+ *
+ ****************************************************************************/
+
+void fs_cwd_removed(FAR const char *path)
+{
+ FAR char *host;
+
+ if (list_is_empty(&g_cwd_list))
+ {
+ return;
+ }
+
+ host = lib_get_pathbuffer();
Review Comment:
Done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]