Re: [libvirt] Re: Reopening the old discussion about virDomainBlockPeek

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

 



On Wed, Jun 04, 2008 at 04:10:32PM +0100, Richard W.M. Jones wrote:
> Attached is an updated patch.  The changes are:
> 
>  - updated to latest CVS
>  - run make check / syntax-check
>  - remove virsh subcommand (as per Dan's suggestion - see below)
>  - some more things that Dan pointed out - see below
> 
> I would like to add this to CVS because it is quite a pain tracking
> CVS changes.  I know there's no remote support at the moment, but I
> can add that later.
[...]
> +int                     virDomainBlockPeek (virDomainPtr dom,
> +                                            const char *path,
> +                                            unsigned long long offset,
> +                                            size_t size,
> +                                            void *buffer);

  hum, we should add a flags extra data. And based on some IRC discussion
you already have an use for this.

  The API feels a bit dangerous to me, because this is a completely
unstructured API, you just get data, you have a priori no way to analyze
what it returns. But I understand why you need it and I don't see a workaround.
So I'm fine with this, it's a bit of a trick, it probably won't work 
in all cases, but it's still read only and allow to do some analysis,
so that's okay.
  Once you have commited the revised version of the API it woudl be nice
to not wait too much for the remote support if possible.

> Index: tests/sexpr2xmldata/sexpr2xml-curmem.xml
> ===================================================================
> RCS file: /data/cvs/libvirt/tests/sexpr2xmldata/sexpr2xml-curmem.xml,v
> retrieving revision 1.6
> diff -b -u -p -r1.6 sexpr2xml-curmem.xml
> --- tests/sexpr2xmldata/sexpr2xml-curmem.xml	8 May 2008 14:41:56 -0000	1.6
> +++ tests/sexpr2xmldata/sexpr2xml-curmem.xml	4 Jun 2008 15:08:24 -0000
> @@ -15,17 +15,17 @@
>    <on_reboot>restart</on_reboot>
>    <on_crash>restart</on_crash>
>    <devices>
> +    <disk type='file' device='disk'>
> +      <driver name='tap' type='aio'/>
> +      <source file='/xen/rhel5.img'/>
> +      <target dev='xvda' bus='xen'/>
> +    </disk>
>      <interface type='bridge'>
>        <source bridge='xenbr0'/>
>        <target dev='vif5.0'/>
>        <mac address='00:16:3e:1d:06:15'/>
>        <script path='vif-bridge'/>
>      </interface>
> -    <disk type='file' device='disk'>
> -      <driver name='tap' type='aio'/>
> -      <source file='/xen/rhel5.img'/>
> -      <target dev='xvda' bus='xen'/>
> -    </disk>
>      <input type='mouse' bus='xen'/>
>      <graphics type='vnc' port='-1'/>
>      <console type='pty'>
> Index: tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
> ===================================================================
> RCS file: /data/cvs/libvirt/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml,v
> retrieving revision 1.10
> diff -b -u -p -r1.10 sexpr2xml-no-source-cdrom.xml
> --- tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml	8 May 2008 14:41:56 -0000	1.10
> +++ tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml	4 Jun 2008 15:08:25 -0000
> @@ -20,11 +20,6 @@
>    <clock offset='utc'/>
>    <devices>
>      <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
> -    <interface type='bridge'>
> -      <source bridge='xenbr0'/>
> -      <target dev='vif6.0'/>
> -      <mac address='00:16:3e:0a:7b:39'/>
> -    </interface>
>      <disk type='block' device='disk'>
>        <driver name='phy'/>
>        <source dev='/dev/sda8'/>
> @@ -34,6 +29,11 @@
>        <target dev='hdc' bus='ide'/>
>        <readonly/>
>      </disk>
> +    <interface type='bridge'>
> +      <source bridge='xenbr0'/>
> +      <target dev='vif6.0'/>
> +      <mac address='00:16:3e:0a:7b:39'/>
> +    </interface>
>      <input type='mouse' bus='ps2'/>
>      <graphics type='vnc' port='-1'/>
>      <serial type='pty'>


  I don't understand why those 2 are changed in this patch.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]