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

sys/vfs: Iterate over file systems in sequence

This is a cosmetic change when considering vfs_iterate_mounts alone
(which now reports FSs in precise mount order rather than reporting the
most recently mounted, followed by the rest in mount order), but is
helpful for uses of it that need some guarantees in order to produce
reliable results even when iteration and (un)mounting interact.
This commit is contained in:
chrysn 2022-02-15 14:53:24 +01:00
parent 599eade495
commit 9a319a9b4f

View File

@ -896,10 +896,11 @@ const vfs_mount_t *vfs_iterate_mounts(const vfs_mount_t *cur)
/* empty list */
return NULL;
}
node = node->next;
}
else {
node = cur->list_entry.next;
if (node == _vfs_mounts_list.next) {
if (node == _vfs_mounts_list.next->next) {
return NULL;
}
}