machine: clarify WriteAt semantics of BlockDevice

Flash can generally only be written after it has been erased, which
wasn't spelled out explicitly in the interface.
This commit is contained in:
Ayke van Laethem
2025-08-23 11:25:28 +02:00
committed by Ron Evans
parent c80da7eb0d
commit 5ae8fd1f6f
+5
View File
@@ -43,6 +43,11 @@ type BlockDevice interface {
io.ReaderAt
// WriteAt writes the given number of bytes to the block device.
//
// This interface directly writes data to the underlying block device.
// Different kinds of devices have different requirements: most can only
// write data after the page has been erased, and many can only write data
// with specific alignment (such as 4-byte alignment).
io.WriterAt
// Size returns the number of bytes in this block device.