bd: Add sync function to the block device API

/** Ensure data on storage is in sync with the driver
 *
 *  @return         0 on success or a negative error code on failure
 */
virtual int sync()
pull/5926/head
Christopher Haster 2018-01-24 17:58:20 -06:00
parent 98611c8578
commit 3f5d618c89
1 changed files with 9 additions and 0 deletions

View File

@ -59,6 +59,15 @@ public:
*/
virtual int deinit() = 0;
/** Ensure data on storage is in sync with the driver
*
* @return 0 on success or a negative error code on failure
*/
virtual int sync()
{
return 0;
}
/** Read blocks from a block device
*
* If a failure occurs, it is not possible to determine how many bytes succeeded