Skip to content

Commit 3f5d618

Browse files
committed
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()
1 parent 98611c8 commit 3f5d618

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

features/filesystem/bd/BlockDevice.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ class BlockDevice
5959
*/
6060
virtual int deinit() = 0;
6161

62+
/** Ensure data on storage is in sync with the driver
63+
*
64+
* @return 0 on success or a negative error code on failure
65+
*/
66+
virtual int sync()
67+
{
68+
return 0;
69+
}
70+
6271
/** Read blocks from a block device
6372
*
6473
* If a failure occurs, it is not possible to determine how many bytes succeeded

0 commit comments

Comments
 (0)