[SLOF] [PATCH 4/4] Provide "write" function in the disk-label package

Thomas Huth thuth at redhat.com
Thu Nov 10 02:43:38 AEDT 2016


As with the "read" function, the disk-label package should
forward the "write" function to its parent.

Signed-off-by: Thomas Huth <thuth at redhat.com>
---
 slof/fs/packages/disk-label.fs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs
index e034d64..8859fb0 100644
--- a/slof/fs/packages/disk-label.fs
+++ b/slof/fs/packages/disk-label.fs
@@ -126,6 +126,11 @@ CONSTANT /gpt-part-entry
    debug-disk-label? IF dup ." actual=" .d cr THEN
 ;
 
+: write ( addr len -- actual )
+   debug-disk-label? IF 2dup swap ." write-parent: addr=0x" u. ." len=" .d THEN
+   s" write" $call-parent
+   debug-disk-label? IF dup ." actual=" .d cr THEN
+;
 
 \ read sector to array "block"
 : read-sector ( sector-number -- )
-- 
1.8.3.1



More information about the SLOF mailing list