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

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Mon Nov 14 17:50:12 AEDT 2016


Thomas Huth <thuth at redhat.com> writes:

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

Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.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