dosfs: Add sync_device option for msdos_format()

This commit is contained in:
Sebastian Huber
2012-12-13 11:08:03 +01:00
parent 60e8cd430e
commit 4b8e01f7c5
3 changed files with 16 additions and 1 deletions

View File

@@ -94,6 +94,11 @@ typedef struct {
*/
bool skip_alignment;
/**
* @brief Synchronize device after write operations.
*/
bool sync_device;
/**
* @brief The amount of info to output.
*/

View File

@@ -1251,6 +1251,11 @@ int msdos_format
tmp_sec);
}
}
if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
ret_val = rtems_disk_fd_sync(fd);
}
/*
* cleanup:
* sync and unlock disk