mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-24 15:38:34 +08:00
Moved empty test in front of busy tests
This commit is contained in:
@@ -640,16 +640,6 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
|
||||
if (sc != RTEMS_SUCCESSFUL)
|
||||
rtems_set_errno_and_return_minus_one(EIO);
|
||||
|
||||
/*
|
||||
* We deny attempts to delete open directory (if directory is current
|
||||
* directory we assume it is open one)
|
||||
*/
|
||||
if (fat_fd->links_num > 1)
|
||||
{
|
||||
rtems_semaphore_release(fs_info->vol_sema);
|
||||
rtems_set_errno_and_return_minus_one(EBUSY);
|
||||
}
|
||||
|
||||
/*
|
||||
* You cannot remove a node that still has children
|
||||
*/
|
||||
@@ -666,6 +656,16 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *parent_pathloc,
|
||||
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
|
||||
}
|
||||
|
||||
/*
|
||||
* We deny attempts to delete open directory (if directory is current
|
||||
* directory we assume it is open one)
|
||||
*/
|
||||
if (fat_fd->links_num > 1)
|
||||
{
|
||||
rtems_semaphore_release(fs_info->vol_sema);
|
||||
rtems_set_errno_and_return_minus_one(EBUSY);
|
||||
}
|
||||
|
||||
/*
|
||||
* You cannot remove the file system root node.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user