Re: [PATCH 3/4] snapshot: expose location through virsh snapshot-info

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

 



On 11/15/12 00:20, Eric Blake wrote:
On 11/14/2012 11:43 AM, Eric Blake wrote:
Bleah. Raw XML parsing. Wouldn't it be easier in and cleaner convert
this piece code to use the XML parser and xpath?

Not the first time we've done this.  I agree that using the XML parser
and xpath is probably nicer, but it actually takes more code than a
simple strstr.

The code looks OK in what it should be doing, but I don't like the raw
XML parse-hacking stuff. The only reason to put this in as-is would be
if it would be really complicated/overheading to use xpath here.

I'll post an interdiff that shows what it would take to use xpath, and
we can decide based on how nice or ugly it looks.

Here's the diff; any decisions on whether to go with xpath?

  tools/virsh-snapshot.c | 61
+++++++++++++++++++++++++++++++++-----------------
  1 file changed, 40 insertions(+), 21 deletions(-)


I definitely like the xpath version better.

Peter

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