1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/native: unmount fs on exit

This commit is contained in:
Benjamin Valentin 2023-03-03 13:39:09 +01:00
parent 5708ca1945
commit 6fe5d85e11

View File

@ -70,6 +70,10 @@ void pm_off(void)
#endif
#ifdef MODULE_PERIPH_GPIO_LINUX
gpio_linux_teardown();
#endif
#ifdef MODULE_VFS_DEFAULT
extern void auto_unmount_vfs(void);
auto_unmount_vfs();
#endif
real_exit(EXIT_SUCCESS);
}
@ -85,6 +89,10 @@ void pm_reboot(void)
#ifdef MODULE_PERIPH_GPIO_LINUX
gpio_linux_teardown();
#endif
#ifdef MODULE_VFS_DEFAULT
extern void auto_unmount_vfs(void);
auto_unmount_vfs();
#endif
if (real_execve(_native_argv[0], _native_argv, NULL) == -1) {
err(EXIT_FAILURE, "reboot: execve");