From 5708ca19459d66fa6cec50ec73e5150643adbf3b Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 3 Mar 2023 13:35:00 +0100 Subject: [PATCH] vfs: add auto_unmount_vfs() --- sys/vfs/vfs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/vfs/vfs.c b/sys/vfs/vfs.c index e48bbe6f5d..d161dbe63c 100644 --- a/sys/vfs/vfs.c +++ b/sys/vfs/vfs.c @@ -1193,6 +1193,13 @@ void auto_init_vfs(void) } } +void auto_unmount_vfs(void) +{ + for (unsigned i = 0; i < MOUNTPOINTS_NUMOF; ++i) { + vfs_umount(&vfs_mountpoints_xfa[i], true); + } +} + int vfs_mount_by_path(const char *path) { for (unsigned i = 0; i < MOUNTPOINTS_NUMOF; ++i) {