diff mbox

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

Message ID 1478706218-8935-5-git-send-email-thuth@redhat.com
State Changes Requested
Headers show

Commit Message

Thomas Huth Nov. 9, 2016, 3:43 p.m. UTC
As with the "read" function, the disk-label package should
forward the "write" function to its parent.

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

Comments

Nikunj A Dadhania Nov. 14, 2016, 6:50 a.m. UTC | #1
Thomas Huth <thuth@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@redhat.com>

Reviewed-by: Nikunj A Dadhania <nikunj@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
diff mbox

Patch

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