Re: [libvirt] [PATCH]execute netdev_del after receive DEVICE_DELETED event

2014-03-29 Thread xiexiangyou
Hi Laine, On 2014/3/28 23:21, Laine Stump wrote: On 03/28/2014 01:30 PM, xiexiangyou wrote: Thanks for your reply. On 2014/3/27 22:14, Jiri Denemark wrote: On Thu, Mar 27, 2014 at 20:51:24 +0800, x00221466 wrote: Hi, When live detaching the virtual net device, such as virtio nic、

[libvirt] [PATCH 2/2] Prohibit Windows special chars in filenames

2014-03-29 Thread Matthias Bolte
Using any of these chars [:*?|] in a filename is forbidden on Windows and breaks git operations on Windows as git is not able to create those files/directories on clone or pull. Because some of them can be used in UNIX filenames they tend to creep into filenames, especially : in PCI/SCSI device

[libvirt] [PATCH 0/2] Remove and prohibit Windows special chars in filenames

2014-03-29 Thread Matthias Bolte
After I fixed the first problem with a : in a filename a second instance occured shortly afterwards. The first patch fixes this problem and the second patch adds a syntax-check rule to prohibit such Windows special chars in filenames. Matthias -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH 1/2] tests: Fix SCSI test data filenames for Windows

2014-03-29 Thread Matthias Bolte
Windows doesn't allow : in filenames. Commit 6fdece9a332fc668a89bde96af94e7b7cbf6750d added files with a : in their names. This broke git operations on Windows as git is not able to create those files on clone or pull. Replace : with - in the offending filenames and adapt the test case. As the

Re: [libvirt] [PATCH 0/2] Remove and prohibit Windows special chars in filenames

2014-03-29 Thread Eric Blake
On 03/29/2014 05:23 AM, Matthias Bolte wrote: After I fixed the first problem with a : in a filename a second instance occured shortly afterwards. The first patch fixes this problem and the second patch adds a syntax-check rule to prohibit such Windows special chars in filenames. ACK series;

Re: [libvirt] [PATCH 0/2] Remove and prohibit Windows special chars in filenames

2014-03-29 Thread Matthias Bolte
2014-03-29 15:09 GMT+01:00 Eric Blake ebl...@redhat.com: On 03/29/2014 05:23 AM, Matthias Bolte wrote: After I fixed the first problem with a : in a filename a second instance occured shortly afterwards. The first patch fixes this problem and the second patch adds a syntax-check rule to

[libvirt] [PATCH 9/n] util: move detection of shared filesystems

2014-03-29 Thread Eric Blake
The code in virstoragefile.c is getting more complex as I consolidate backing chain handling code. But for the setuid virt-login-shell, we don't need to crawl backing chains. It's easier to audit things for setuid security if there are fewer files involved, so this patch moves the one function

[libvirt] [PATCH 10/n] util: don't support loopback and nbd when setuid

2014-03-29 Thread Eric Blake
The only remaining reason that virt-login-shell was trying to link against virstoragefile was because of a call to virStorageFileFormatTypeToString when spawning a qemu-nbd process - but setuid processes shouldn't be spawning qemu-nbd. * src/util/virfile.c (virFileLoopDeviceAssociate)

[libvirt] [PATCH 11/n] conf: move common disk source functions

2014-03-29 Thread Eric Blake
Move some functions out of domain_conf for use in the next patch where snapshot starts to directly use structs in virstoragefile. * src/conf/domain_conf.c (virDomainDiskDefFree) (virDomainDiskSourcePoolDefParse): Adjust callers. (virDomainDiskSourceDefClear, virDomainDiskSourcePoolDefFree)

[libvirt] [PATCH 12/n] conf: let snapshots share disk source struct

2014-03-29 Thread Eric Blake
Now that we have a common struct, it's time to start using it! Since external snapshots make a longer backing chain, it is only natural to use the same struct for the file created by the snapshot as what we use for domain disks. * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Use common

[libvirt] [PATCH 3/5] Improve virsh autocompletion (global ctl object)

2014-03-29 Thread Solly Ross
This patch introduces a way for completers to retrieve the current vshControl object by using the vshGetCompleterCtl() macro. When readline is enabled, the main method stores the vshControl pointer in a variable that is file-global to virsh.c. Then, that pointer can be retrieved by the

[libvirt] [PATCH 0/5] Another attempt at improving virsh autocompletion

2014-03-29 Thread Solly Ross
This patch set represents yet another attempt to improve the virsh autocompletion. When writing this patch, I tried to take into account the comments on the previous attempt at autocompletion by Tomas Meszaros. Specifically, it was reccomended that any completion use the existing methods that

[libvirt] [PATCH 2/5] Improve virsh autocompletion (base framework)

2014-03-29 Thread Solly Ross
Previously, virsh was able to complete initial command names, as well as the names of flag options. However, this completion was clunky for a number of reasons: - it would provide a flag as an option for completion even if it had already been used - it did not support completion of positional

[libvirt] [PATCH 4/5] Improve virsh autocompletion (domain completer)

2014-03-29 Thread Solly Ross
This patch introduces a custom completer for domains, and sets it to be used for all of the domain arguments. In order to facilitate this, the functions involved in retrieve in a list of domains were moved from virsh-domain-monitor to virsh-completer, where they can be included by any file that

[libvirt] [PATCH 5/5] Improve virsh autocompletion (enum completer macro)

2014-03-29 Thread Solly Ross
This patch adds a utility macro which generates completers for enum-type string options (i.e. those options which may be one of a static set of strings). Instead of having to manually implement a completers for such options, the macro may be used as such: `VSH_STRING_COMPLETER(ctl, SomeOption,

Re: [libvirt] [PATCH 0/5] Another attempt at improving virsh autocompletion

2014-03-29 Thread Eric Blake
On 03/29/2014 08:36 PM, Solly Ross wrote: This patch set represents yet another attempt to improve the virsh autocompletion. When writing this patch, I tried to take into account the comments on the previous attempt at autocompletion by Tomas Meszaros. Nice - I'm hoping you can get it all the

Re: [libvirt] [PATCH 1/5] Improve virsh autocompletion (extract parser)

2014-03-29 Thread Eric Blake
On 03/29/2014 08:36 PM, Solly Ross wrote: This commit extracts the parsing logic from vshCommnadParse s/Commnad/Command/ so that it can be used by other methods. The vshCommnadParse and again method is designed to parse full commands and error out on unknown information, so it is not

[libvirt] [PATCH 13/n] conf: tweak volume target struct details

2014-03-29 Thread Eric Blake
Some preparatory work before consolidating storage volume structs with the rest of virstoragefile. Making these changes allows a volume target to be much closer to the virStorageSource struct. * src/conf/storage_conf.h (_virStorageVolTarget): Change perms to pointer, enhance comments. *

[libvirt] [PATCH 15/n] conf: use common struct in storage volumes

2014-03-29 Thread Eric Blake
A fairly smooth transition. And now that domain disks and storage volumes share a common struct, it opens the doors for a future patch to expose more details in the XML for both objects. * src/conf/storage_conf.h (_virStorageVolTarget): Delete. (_virStorageVolDef): Use common type. *

[libvirt] [PATCH 14/n] conf: move volume structs to util/

2014-03-29 Thread Eric Blake
Another step towards unification of structures. While we might not expose everything in XML via domain disk as we do for storage volume pointer, both places want to deal with (at least part of) the backing chain; therefore, moving towards a single struct usable from both contexts will make the