[SLOF] [PATCH 4/4] Provide "write" function in the disk-label package
Alexey Kardashevskiy
aik at ozlabs.ru
Thu Nov 24 17:44:57 AEDT 2016
On 16/11/16 00:02, Thomas Huth wrote:
> As with the "read" function, the disk-label package should
> forward the "write" function to its parent.
>
> Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> Signed-off-by: Thomas Huth <thuth at redhat.com>
After this patch, I cannot boot a guest at all:
qemu-system-ppc64: Incorrect order for descriptors
This is my cmdline (basically, virtio-scsi):
/home/aik/p/qemu/ppc64-softmmu/qemu-system-ppc64 -nodefaults -chardev
stdio,id=STDIO0,signal=off,mux=on -device
spapr-vty,id=svty0,chardev=STDIO0,reg=0x71000100 -mon
id=MON0,chardev=STDIO0,mode=readline -nographic -vga none -enable-kvm
-device virtio-scsi-pci,id=vscsi0 -drive
id=DRIVE0,if=none,file=img/u16_04_32G_htx_406.qcow2,format=qcow2 -device
scsi-disk,id=scsi-disk0,drive=DRIVE0 -bios ./slof.bin -machine pseries
> ---
> 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 -- )
>
--
Alexey
More information about the SLOF
mailing list