forked from Imagelibrary/rtems
dosfs: Add sync_device option for msdos_format()
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user