Re: [kvm-unit-tests PATCH 11/11] arm/pci: PCI testdev test flavour printing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 09, 2016 at 01:22:58PM +0100, Alexander Gordeev wrote:
> Cc: Andrew Jones <drjones@xxxxxxxxxx>
> Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
> ---
>  lib/pci-testdev.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/lib/pci-testdev.c b/lib/pci-testdev.c
> index dd6a5ac..f7f291f 100644
> --- a/lib/pci-testdev.c
> +++ b/lib/pci-testdev.c
> @@ -140,6 +140,23 @@ static bool pci_testdev_one(struct pci_test_dev_hdr *test,
>  	return true;
>  }
>  
> +void pci_testdev_print(struct pci_test_dev_hdr *test,
> +		       struct pci_testdev_ops *ops)
> +{
> +	bool io = (ops == &pci_testdev_io_ops);
> +	int i;
> +
> +	printf("pci-testdev %3s: ", io ? "io" : "mem");
> +	for (i = 0;; ++i) {
> +		char c = ops->read8(&test->name[i]);
> +		if (!c)
> +			break;
> +		printf("%c", c);
> +	}
> +	printf("\n");
> +
> +}
> +
>  static int pci_testdev_all(struct pci_test_dev_hdr *test,
>  			   struct pci_testdev_ops *ops)
>  {
> @@ -148,6 +165,7 @@ static int pci_testdev_all(struct pci_test_dev_hdr *test,
>  	for (i = 0;; i++) {
>  		if (!pci_testdev_one(test, i, ops))
>  			break;
> +		pci_testdev_print(test, ops);
>  	}
>  
>  	return i;
> -- 
> 1.8.3.1
>

This can be squashed into 6/11-8/11

Thanks,
drew 
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux