Provide "write" function in the disk-label package

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

Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Thomas Huth 2016-11-15 14:02:52 +01:00 committed by Alexey Kardashevskiy
parent 264553932b
commit a0b96fe66f
1 changed files with 5 additions and 0 deletions

View File

@ -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 -- )